3
0
Fork 0
forked from mirrors/nixpkgs

cargo-about: unbreak on darwin

This commit is contained in:
figsoda 2022-10-19 09:17:42 -04:00
parent d2cfe468f8
commit 7b92f76b27
2 changed files with 45 additions and 6 deletions

View file

@ -1,4 +1,11 @@
{ lib, rustPlatform, fetchFromGitHub, pkg-config, zstd, stdenv }:
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, zstd
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-about";
@ -11,14 +18,21 @@ rustPlatform.buildRustPackage rec {
sha256 = "sha256-T8Hhody0jMmZb6/xMkSvKCv4STZPbcrf/UB3APspYDM=";
};
# enable pkg-config feature of zstd
cargoPatches = [ ./zstd-pkg-config.patch ];
cargoPatches = [
# update mimalloc to fix build with older apple sdks
./update-mimalloc.patch
cargoSha256 = "sha256-x/HzDYNy0FDxJmhjSUUEiyahM7Sw27aC+ULP/Ii0X/8=";
# enable pkg-config feature of zstd
./zstd-pkg-config.patch
];
cargoSha256 = "sha256-2Reqj+WP6OoaB/3Z5llZP4c5ToVmMNX0Fe0IqDwcg2E=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ zstd ];
buildInputs = [ zstd ] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
meta = with lib; {
description = "Cargo plugin to generate list of all licenses for a crate";
@ -26,6 +40,5 @@ rustPlatform.buildRustPackage rec {
changelog = "https://github.com/EmbarkStudios/cargo-about/blob/${version}/CHANGELOG.md";
license = with licenses; [ mit /* or */ asl20 ];
maintainers = with maintainers; [ evanjs figsoda ];
broken = stdenv.isDarwin;
};
}

View file

@ -0,0 +1,26 @@
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -829,9 +829,9 @@ checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f"
[[package]]
name = "libmimalloc-sys"
-version = "0.1.24"
+version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7705fc40f6ed493f73584abbb324e74f96b358ff60dfe5659a0f8fc12c590a69"
+checksum = "8fc093ab289b0bfda3aa1bdfab9c9542be29c7ef385cfcbe77f8c9813588eb48"
dependencies = [
"cc",
]
@@ -884,9 +884,9 @@ dependencies = [
[[package]]
name = "mimalloc"
-version = "0.1.28"
+version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0dfa131390c2f6bdb3242f65ff271fcdaca5ff7b6c08f28398be7f2280e3926"
+checksum = "76ce6a4b40d3bff9eb3ce9881ca0737a85072f9f975886082640cd46a75cdb35"
dependencies = [
"libmimalloc-sys",
]