Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

untrunc: init at 2018.01.13 #36167

Merged
merged 1 commit into from Mar 1, 2018
Merged

untrunc: init at 2018.01.13 #36167

merged 1 commit into from Mar 1, 2018

Conversation

erikarvstedt
Copy link
Member

@erikarvstedt erikarvstedt commented Mar 1, 2018

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

g++ -o $out/bin/untrunc \
-Wno-deprecated-declarations \
$src/file.cpp $src/main.cpp $src/track.cpp $src/atom.cpp $src/mp4.cpp \
-I$libavConfiguredSrc -lavformat -lavcodec -lavutil
Copy link
Member

@Mic92 Mic92 Mar 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use buildPhase and installPhase here? We want to have at least fixup phase running unless there is a good reason not to.

libavConfiguredSrc = libav_12.overrideAttrs (oldAttrs: {
name = "libav-configured-src";
outputs = [ "out" ];
phases = [ "unpackPhase" "configurePhase" "copyConfiguredSrc" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patchPhase should be added here as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.
Should I rename copyConfiguredSrc to just installPhase?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be less confusing to people.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I've fixed all remaining quirks.

@erikarvstedt erikarvstedt force-pushed the untrunc branch 3 times, most recently from 5279dbc to 49315f0 Compare March 1, 2018 19:21
@erikarvstedt erikarvstedt mentioned this pull request Mar 1, 2018
8 tasks
@Mic92
Copy link
Member

Mic92 commented Mar 1, 2018

@GrahamcOfBorg build untrunc

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘libpciaccess-0.14’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/servers/x11/xorg/default.nix:1115 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

 #  define __STDC_CONSTANT_MACROS
 
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/aanxrfj71bg2dghijjnp3xgb5nw72bms-untrunc-2018.01.13
shrinking /nix/store/aanxrfj71bg2dghijjnp3xgb5nw72bms-untrunc-2018.01.13/bin/untrunc
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/aanxrfj71bg2dghijjnp3xgb5nw72bms-untrunc-2018.01.13/bin 
patching script interpreter paths in /nix/store/aanxrfj71bg2dghijjnp3xgb5nw72bms-untrunc-2018.01.13
checking for references to /tmp/nix-build-untrunc-2018.01.13.drv-0 in /nix/store/aanxrfj71bg2dghijjnp3xgb5nw72bms-untrunc-2018.01.13...
/nix/store/aanxrfj71bg2dghijjnp3xgb5nw72bms-untrunc-2018.01.13

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

 #  define __STDC_CONSTANT_MACROS

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/8v60i93lag663pibg7n6irgx662rmdsj-untrunc-2018.01.13
shrinking /nix/store/8v60i93lag663pibg7n6irgx662rmdsj-untrunc-2018.01.13/bin/untrunc
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/8v60i93lag663pibg7n6irgx662rmdsj-untrunc-2018.01.13/bin
patching script interpreter paths in /nix/store/8v60i93lag663pibg7n6irgx662rmdsj-untrunc-2018.01.13
checking for references to /build in /nix/store/8v60i93lag663pibg7n6irgx662rmdsj-untrunc-2018.01.13...
/nix/store/8v60i93lag663pibg7n6irgx662rmdsj-untrunc-2018.01.13

@erikarvstedt
Copy link
Member Author

The Darwin build has failed. Should I add meta.platform = platforms.linux?

@Mic92
Copy link
Member

Mic92 commented Mar 1, 2018

@erikarvstedt no, that is fine. The build is marked as unsupported on darwin as dependencies are supported. We can safely assume that platforms supporting libav are likely to support untrunc as well.

@Mic92 Mic92 merged commit fd9ce6c into NixOS:master Mar 1, 2018
@erikarvstedt
Copy link
Member Author

Thanks for guiding me through this. 😃
Grüße nach Hamburg!

@Mic92
Copy link
Member

Mic92 commented Mar 1, 2018

Grüße aus Edinburgh zurück.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants