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

quaternion: Darwin support, fix dependencies and installed outputs #45300

Merged
merged 1 commit into from Aug 19, 2018

Conversation

thefloweringash
Copy link
Member

Motivation for this change

Darwin support, and tidying things up.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

substituteInPlace $out/share/applications/quaternion.desktop \
--replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
'' + lib.optionalString stdenv.isDarwin ''
mv $out/bin $out/Applications
Copy link
Member

Choose a reason for hiding this comment

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

Is the application the only thing in bin? It's probably better to only move the application in case anything else ever gets added.

@LnL7
Copy link
Member

LnL7 commented Aug 18, 2018

@GrahamcOfBorg build quaternion

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: quaternion

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/afc0n74h24964gcilvz8rb4y3f9p7iya-quaternion-0.0.9.2
shrinking /nix/store/afc0n74h24964gcilvz8rb4y3f9p7iya-quaternion-0.0.9.2/bin/quaternion
strip is /nix/store/4md2i310zklkkl5j41yw70gcwgn4kav5-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/afc0n74h24964gcilvz8rb4y3f9p7iya-quaternion-0.0.9.2/bin
patching script interpreter paths in /nix/store/afc0n74h24964gcilvz8rb4y3f9p7iya-quaternion-0.0.9.2
checking for references to /build in /nix/store/afc0n74h24964gcilvz8rb4y3f9p7iya-quaternion-0.0.9.2...
postPatchMkspecs
postPatchMkspecs
/nix/store/afc0n74h24964gcilvz8rb4y3f9p7iya-quaternion-0.0.9.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: quaternion

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/bcrgc3q49dvjbjsaqa5wlip4v4xjxi3a-quaternion-0.0.9.2
shrinking /nix/store/bcrgc3q49dvjbjsaqa5wlip4v4xjxi3a-quaternion-0.0.9.2/bin/quaternion
strip is /nix/store/553rihc190vsyy8b22iqcq25a6489h8y-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bcrgc3q49dvjbjsaqa5wlip4v4xjxi3a-quaternion-0.0.9.2/bin
patching script interpreter paths in /nix/store/bcrgc3q49dvjbjsaqa5wlip4v4xjxi3a-quaternion-0.0.9.2
checking for references to /build in /nix/store/bcrgc3q49dvjbjsaqa5wlip4v4xjxi3a-quaternion-0.0.9.2...
postPatchMkspecs
postPatchMkspecs
/nix/store/bcrgc3q49dvjbjsaqa5wlip4v4xjxi3a-quaternion-0.0.9.2

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: quaternion

Partial log (click to expand)

-- Installing: /nix/store/nxy0mg6drqy5zrsnwjvb7sdrcc7bqdh9-quaternion-0.0.9.2/bin/quaternion.app/Contents
-- Installing: /nix/store/nxy0mg6drqy5zrsnwjvb7sdrcc7bqdh9-quaternion-0.0.9.2/bin/quaternion.app/Contents/Info.plist
-- Installing: /nix/store/nxy0mg6drqy5zrsnwjvb7sdrcc7bqdh9-quaternion-0.0.9.2/bin/quaternion.app/Contents/MacOS
-- Installing: /nix/store/nxy0mg6drqy5zrsnwjvb7sdrcc7bqdh9-quaternion-0.0.9.2/bin/quaternion.app/Contents/MacOS/quaternion
post-installation fixup
strip is /nix/store/bg39mxc401qqxgjasxfgardi6xl2ikmc-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/nxy0mg6drqy5zrsnwjvb7sdrcc7bqdh9-quaternion-0.0.9.2
postPatchMkspecs
postPatchMkspecs
/nix/store/nxy0mg6drqy5zrsnwjvb7sdrcc7bqdh9-quaternion-0.0.9.2

substituteInPlace $out/share/applications/quaternion.desktop \
--replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
'' + lib.optionalString stdenv.isDarwin ''
Copy link
Member

Choose a reason for hiding this comment

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

You can just use

if stdenv.isDarwin then ''
  ...
'' else ''
  ...
''

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

Thanks

@LnL7 LnL7 merged commit bbd9a9d into NixOS:master Aug 19, 2018
@thefloweringash thefloweringash deleted the quaternion-darwin branch September 24, 2018 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants