From 3807dfa1f2a509813bbec126e0490f5db3e5eed8 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 18 Mar 2023 20:14:35 -0400 Subject: [PATCH] cargo-update: fix build on darwin --- .../tools/rust/cargo-update/default.nix | 29 ++++++++++++++----- pkgs/top-level/all-packages.nix | 4 +-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-update/default.nix b/pkgs/development/tools/rust/cargo-update/default.nix index d3b61ae037d5..c2ecdd455970 100644 --- a/pkgs/development/tools/rust/cargo-update/default.nix +++ b/pkgs/development/tools/rust/cargo-update/default.nix @@ -1,16 +1,17 @@ -{ lib, stdenv +{ lib , rustPlatform , fetchCrate , cmake -, pkg-config , installShellFiles +, pkg-config , ronn +, stdenv , curl -, libgit2 +, libgit2_1_5 , libssh2 , openssl -, Security , zlib +, darwin }: rustPlatform.buildRustPackage rec { @@ -24,10 +25,24 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-x7RK6Wix5TB5/Ff2qWis3HAhBReWekeoxjcFUv19oB4="; - nativeBuildInputs = [ cmake installShellFiles pkg-config ronn ]; + nativeBuildInputs = [ + cmake + installShellFiles + pkg-config + ronn + ] ++ lib.optionals stdenv.isDarwin [ + curl + ]; - buildInputs = [ libgit2 libssh2 openssl zlib ] - ++ lib.optionals stdenv.isDarwin [ curl Security ]; + buildInputs = [ + libgit2_1_5 + libssh2 + openssl + zlib + ] ++ lib.optionals stdenv.isDarwin [ + curl + darwin.apple_sdk.frameworks.Security + ]; postBuild = '' # Man pages contain non-ASCII, so explicitly set encoding to UTF-8. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 37c573123715..82c082183ec3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15996,9 +15996,7 @@ with pkgs; cargo-tarpaulin = callPackage ../development/tools/analysis/cargo-tarpaulin { inherit (darwin.apple_sdk.frameworks) Security; }; - cargo-update = callPackage ../development/tools/rust/cargo-update { - inherit (darwin.apple_sdk.frameworks) Security; - }; + cargo-update = callPackage ../development/tools/rust/cargo-update { }; cargo-asm = callPackage ../development/tools/rust/cargo-asm { inherit (darwin.apple_sdk.frameworks) Security;