1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

Merge pull request #143861 from figsoda/crabz-fix-darwin

crabz: fix darwin build
This commit is contained in:
Domen Kožar 2021-11-06 07:14:54 -06:00 committed by GitHub
commit 4c23c4076c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,15 @@ rustPlatform.buildRustPackage rec {
Security
];
# link System as a dylib instead of a framework on macos
postPatch = lib.optionalString stdenv.isDarwin ''
core_affinity=../$(stripHash $cargoDeps)/core_affinity
oldHash=$(sha256sum $core_affinity/src/lib.rs | cut -d " " -f 1)
substituteInPlace $core_affinity/src/lib.rs --replace framework dylib
substituteInPlace $core_affinity/.cargo-checksum.json \
--replace $oldHash $(sha256sum $core_affinity/src/lib.rs | cut -d " " -f 1)
'';
meta = with lib; {
description = "A cross platform, fast, compression and decompression tool";
homepage = "https://github.com/sstadick/crabz";