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

cargo-edit: fix Darwin build #100289

Merged
merged 2 commits into from Oct 13, 2020
Merged

cargo-edit: fix Darwin build #100289

merged 2 commits into from Oct 13, 2020

Conversation

@happysalada
Copy link
Contributor

@happysalada happysalada commented Oct 12, 2020

Motivation for this change

Latest version was not building on darwin

Things done

Originally my intent was only to change things on darwin platform.
It appears though that libz was missing as a dependency.
Also in a lot of recent rust builds, cc crate attempts to run xcbuild.
I also run nixfmt, so some format has changed a little bit.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ];
nativeBuildInputs = [
pkg-config
xcbuild # the cc crate attempts to run xcbuild

This comment has been minimized.

@danieldk

danieldk Oct 12, 2020
Member

This should not be necessary once staging is merged in master:

#97000

Maybe add a reference + comment that this should be removed once that PR lands?

Also, the xcbuild dependency should (probably) be conditional so that's only used on Darwin.

This comment has been minimized.

@happysalada

happysalada Oct 13, 2020
Author Contributor

pushed a fix, let me know if that works for you.

This comment has been minimized.

@danieldk

danieldk Oct 13, 2020
Member

Thanks! I have pushed a change that makes the formatting a little more canonical. While at it, I tacked on another commit that passes the Security framework in the preferred manner.

This comment has been minimized.

@happysalada

happysalada Oct 13, 2020
Author Contributor

Thanks!
I didn't know that was the prefered manner. Will keep it in mind for next time.

description =
"A utility for managing cargo dependencies from the command line";
homepage = "https://github.com/killercup/cargo-edit";
license = with licenses; [ asl20 /* or */ mit ];
license = with licenses; [
asl20 # or
mit
];
Comment on lines 29 to 35

This comment has been minimized.

@danieldk

danieldk Oct 12, 2020
Member

Are these changes necessary? Did nixpkgs-fmt make them?

This comment has been minimized.

@happysalada

happysalada Oct 13, 2020
Author Contributor

yes, I just ran the formatter.

This comment has been minimized.

@danieldk

danieldk Oct 13, 2020
Member

Strange, I don't get that formatting with nixpkgs-fmt.

@happysalada happysalada requested a review from danieldk Oct 13, 2020
@danieldk danieldk force-pushed the happysalada:cargo-edit branch from 4a0a3c1 to f914267 Oct 13, 2020
Copy link
Member

@danieldk danieldk left a comment

Should be good to go once ofborg is also happy.

@danieldk danieldk merged commit 7ab3951 into NixOS:master Oct 13, 2020
19 checks passed
19 checks passed
@github-actions
tests
Details
@github-actions
action
Details
@ofborg
Evaluation Performance Report Evaluator Performance Report
Details
@github-actions
Wait for ofborg
Details
@ofborg
cargo-edit, cargo-edit.passthru.tests on aarch64-linux Success
Details
@ofborg
cargo-edit, cargo-edit.passthru.tests on x86_64-linux Success
Details
@ofborg
grahamcofborg-eval ^.^!
Details
@ofborg
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
@ofborg
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f914267"; rev="f91426713b85f6b1e6d0d5d0b0e38366aa3b2c9a"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
@ofborg
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f914267"; rev="f91426713b85f6b1e6d0d5d0b0e38366aa3b2c9a"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f914267"; rev="f91426713b85f6b1e6d0d5d0b0e38366aa3b2c9a"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f914267"; rev="f91426713b85f6b1e6d0d5d0b0e38366aa3b2c9a"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f914267"; rev="f91426713b85f6b1e6d0d5d0b0e38366aa3b2c9a"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f914267"; rev="f91426713b85f6b1e6d0d5d0b0e38366aa3b2c9a"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f914267"; rev="f91426713b85f6b1e6d0d5d0b0e38366aa3b2c9a"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants