diff options
author | Daniƫl de Kok <me@danieldk.eu> | 2020-10-13 09:12:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 09:12:34 +0200 |
commit | 7ab39519e06b1e1fb459d034948fd53d049cf20e (patch) | |
tree | 65e4e45a0232095f8e942be2e6d04f90b06c2ae6 /pkgs | |
parent | 3132e09988593c93a3bfd7c69d9fee8a1e37884a (diff) | |
parent | f91426713b85f6b1e6d0d5d0b0e38366aa3b2c9a (diff) |
Merge pull request #100289 from happysalada/cargo-edit
cargo-edit: fix Darwin build
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/package-management/cargo-edit/default.nix | 28 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 26 insertions, 6 deletions
diff --git a/pkgs/tools/package-management/cargo-edit/default.nix b/pkgs/tools/package-management/cargo-edit/default.nix index 3115b720b6b8..ef286ae64494 100644 --- a/pkgs/tools/package-management/cargo-edit/default.nix +++ b/pkgs/tools/package-management/cargo-edit/default.nix @@ -1,6 +1,14 @@ -{ stdenv, lib, darwin -, rustPlatform, fetchFromGitHub -, openssl, pkg-config, libiconv }: +{ stdenv +, lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, xcbuild +, openssl +, libiconv +, Security +, zlib +}: rustPlatform.buildRustPackage rec { pname = "cargo-edit"; @@ -15,8 +23,18 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1h1sy54p7zxijydnhzvkxli90d72biv1inni17licb0vb9dihmnf"; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; + nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ + # The cc crate runs xcbuild. This dependency can be removed once + # the following PR is merged from staging into master: + # + # https://github.com/NixOS/nixpkgs/pull/97000 + xcbuild + ]; + + buildInputs = [ openssl zlib ] ++ lib.optionals stdenv.isDarwin [ + libiconv + Security + ]; doCheck = false; # integration tests depend on changing cargo config diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2c6328172b25..a7e4069a3b9f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9702,7 +9702,9 @@ in }; cargo-deps = callPackage ../tools/package-management/cargo-deps { }; cargo-download = callPackage ../tools/package-management/cargo-download { }; - cargo-edit = callPackage ../tools/package-management/cargo-edit { }; + cargo-edit = callPackage ../tools/package-management/cargo-edit { + inherit (darwin.apple_sdk.frameworks) Security; + }; cargo-kcov = callPackage ../tools/package-management/cargo-kcov { }; cargo-graph = callPackage ../tools/package-management/cargo-graph { }; cargo-license = callPackage ../tools/package-management/cargo-license { }; |