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

trash-cli: enable darwin build #41847

Merged
merged 1 commit into from Jun 11, 2018
Merged

Conversation

mnacamura
Copy link
Contributor

Motivation for this change
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.

@@ -19,7 +17,8 @@ python3Packages.buildPythonApplication rec {
(substituteAll {
src = ./nix-paths.patch;
df = "${coreutils}/bin/df";
libc = "${stdenv.cc.libc.out}/lib/libc.so.6";
libc = let ext = if stdenv.isDarwin then ".dylib" else ".so.6";
Copy link
Member

Choose a reason for hiding this comment

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

I think you can replace this with: stdenv.hostPlatform.extensions.sharedLibrary. The .6 part should be optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for suggestion. I replaced this line with

libc = "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}";

and the build failed with

OSError: /nix/store/pr73kx0cdszbv9iw49g8dzi0nqxfjbx2-glibc-2.27/lib/libc.so: invalid ELF header

on Linux. .6 seems to be necessary.

Copy link
Member

Choose a reason for hiding this comment

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

Very weird never mind then!

@matthewbauer matthewbauer merged commit 4206554 into NixOS:master Jun 11, 2018
@mnacamura mnacamura deleted the trash-cli-darwin branch June 11, 2018 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants