lol

cargo-about: unbreak on darwin

figsoda 7b92f76b d2cfe468

+45 -6
+19 -6
pkgs/development/tools/rust/cargo-about/default.nix
··· 1 - { lib, rustPlatform, fetchFromGitHub, pkg-config, zstd, stdenv }: 1 + { lib 2 + , rustPlatform 3 + , fetchFromGitHub 4 + , pkg-config 5 + , zstd 6 + , stdenv 7 + , darwin 8 + }: 2 9 3 10 rustPlatform.buildRustPackage rec { 4 11 pname = "cargo-about"; ··· 11 18 sha256 = "sha256-T8Hhody0jMmZb6/xMkSvKCv4STZPbcrf/UB3APspYDM="; 12 19 }; 13 20 14 - # enable pkg-config feature of zstd 15 - cargoPatches = [ ./zstd-pkg-config.patch ]; 21 + cargoPatches = [ 22 + # update mimalloc to fix build with older apple sdks 23 + ./update-mimalloc.patch 24 + 25 + # enable pkg-config feature of zstd 26 + ./zstd-pkg-config.patch 27 + ]; 16 28 17 - cargoSha256 = "sha256-x/HzDYNy0FDxJmhjSUUEiyahM7Sw27aC+ULP/Ii0X/8="; 29 + cargoSha256 = "sha256-2Reqj+WP6OoaB/3Z5llZP4c5ToVmMNX0Fe0IqDwcg2E="; 18 30 19 31 nativeBuildInputs = [ pkg-config ]; 20 32 21 - buildInputs = [ zstd ]; 33 + buildInputs = [ zstd ] ++ lib.optionals stdenv.isDarwin [ 34 + darwin.apple_sdk.frameworks.Security 35 + ]; 22 36 23 37 meta = with lib; { 24 38 description = "Cargo plugin to generate list of all licenses for a crate"; ··· 26 40 changelog = "https://github.com/EmbarkStudios/cargo-about/blob/${version}/CHANGELOG.md"; 27 41 license = with licenses; [ mit /* or */ asl20 ]; 28 42 maintainers = with maintainers; [ evanjs figsoda ]; 29 - broken = stdenv.isDarwin; 30 43 }; 31 44 }
+26
pkgs/development/tools/rust/cargo-about/update-mimalloc.patch
··· 1 + --- a/Cargo.lock 2 + +++ b/Cargo.lock 3 + @@ -829,9 +829,9 @@ checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f" 4 + 5 + [[package]] 6 + name = "libmimalloc-sys" 7 + -version = "0.1.24" 8 + +version = "0.1.26" 9 + source = "registry+https://github.com/rust-lang/crates.io-index" 10 + -checksum = "7705fc40f6ed493f73584abbb324e74f96b358ff60dfe5659a0f8fc12c590a69" 11 + +checksum = "8fc093ab289b0bfda3aa1bdfab9c9542be29c7ef385cfcbe77f8c9813588eb48" 12 + dependencies = [ 13 + "cc", 14 + ] 15 + @@ -884,9 +884,9 @@ dependencies = [ 16 + 17 + [[package]] 18 + name = "mimalloc" 19 + -version = "0.1.28" 20 + +version = "0.1.30" 21 + source = "registry+https://github.com/rust-lang/crates.io-index" 22 + -checksum = "b0dfa131390c2f6bdb3242f65ff271fcdaca5ff7b6c08f28398be7f2280e3926" 23 + +checksum = "76ce6a4b40d3bff9eb3ce9881ca0737a85072f9f975886082640cd46a75cdb35" 24 + dependencies = [ 25 + "libmimalloc-sys", 26 + ]