cargo-update: fix build on darwin

This commit is contained in:
figsoda
2023-03-18 20:15:09 -04:00
parent 0e19cb589e
commit 3807dfa1f2
2 changed files with 23 additions and 10 deletions
@@ -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.
+1 -3
View File
@@ -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;