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

bat: support darwin #41503

Merged
merged 1 commit into from Jun 6, 2018
Merged

bat: support darwin #41503

merged 1 commit into from Jun 6, 2018

Conversation

lo1tuma
Copy link
Member

@lo1tuma lo1tuma commented Jun 5, 2018

Motivation for this change

This enables darwin support for bat.

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/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg added the 6.topic: darwin Running or building packages on Darwin label Jun 5, 2018
@@ -15,11 +15,15 @@ rustPlatform.buildRustPackage rec {

nativeBuildInputs = [ cmake pkgconfig zlib ];

buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [
libiconv darwin.apple_sdk.frameworks.Security
Copy link
Member

Choose a reason for hiding this comment

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

Can you put libiconv in buildInputs? The conditional should not be necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, will do.
FWIW: this was inspired by exa which also only includes libiconv conditionally.

@xeji
Copy link
Contributor

xeji commented Jun 5, 2018

@GrahamcOfBorg build bat

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: bat

Partial log (click to expand)


installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/q1b0zdb4k27hd3ixsakn26dkvyl50i2q-bat-0.4.1
shrinking /nix/store/q1b0zdb4k27hd3ixsakn26dkvyl50i2q-bat-0.4.1/bin/bat
strip is /nix/store/21ymadblbmsbb2bk4q7gl4kjasp8zmgd-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/q1b0zdb4k27hd3ixsakn26dkvyl50i2q-bat-0.4.1/bin
patching script interpreter paths in /nix/store/q1b0zdb4k27hd3ixsakn26dkvyl50i2q-bat-0.4.1
checking for references to /build in /nix/store/q1b0zdb4k27hd3ixsakn26dkvyl50i2q-bat-0.4.1...
/nix/store/q1b0zdb4k27hd3ixsakn26dkvyl50i2q-bat-0.4.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: bat

Partial log (click to expand)


installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/lc3fxv0m6c2h7y8ljf7fs0zk8nsx6hyx-bat-0.4.1
shrinking /nix/store/lc3fxv0m6c2h7y8ljf7fs0zk8nsx6hyx-bat-0.4.1/bin/bat
strip is /nix/store/qg2agrqkf240s656d207zqhipl0bc2id-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/lc3fxv0m6c2h7y8ljf7fs0zk8nsx6hyx-bat-0.4.1/bin
patching script interpreter paths in /nix/store/lc3fxv0m6c2h7y8ljf7fs0zk8nsx6hyx-bat-0.4.1
checking for references to /build in /nix/store/lc3fxv0m6c2h7y8ljf7fs0zk8nsx6hyx-bat-0.4.1...
/nix/store/lc3fxv0m6c2h7y8ljf7fs0zk8nsx6hyx-bat-0.4.1

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: bat

Partial log (click to expand)

test test_snapshots ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

installing
post-installation fixup
strip is /nix/store/yyak5sjv68n9vdgnkd2cb5djk1l9sqj5-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/3dwi3sljj8pqzmnb2asypkj49hpmvxc5-bat-0.4.1/bin
patching script interpreter paths in /nix/store/3dwi3sljj8pqzmnb2asypkj49hpmvxc5-bat-0.4.1
/nix/store/3dwi3sljj8pqzmnb2asypkj49hpmvxc5-bat-0.4.1

@matthewbauer matthewbauer merged commit 907d1de into NixOS:master Jun 6, 2018
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