figsoda 2023-01-26 14:55:51 -05:00
parent 5d4d40488d
commit 1c4e970c15
2 changed files with 4 additions and 25 deletions

View File

@ -2,42 +2,23 @@
, rustPlatform
, fetchFromGitHub
, cmake
, stdenv
, libiconv
, CoreFoundation
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "crabz";
version = "0.7.10";
version = "0.8.1";
src = fetchFromGitHub {
owner = "sstadick";
repo = pname;
rev = "v${version}";
sha256 = "sha256-A1mjnGnFKgCdwr2J0MBUzpL/UI9nOHDxbrZ9UazqZik=";
sha256 = "sha256-w/e0NFmBsYNEECT+2zHEm/UUpp5LxPYr0BdKikT2o1M=";
};
cargoSha256 = "sha256-YxO0YPY82Q6dXOBs2ZoSAv14p67kNsmhGOiwt+voD5I=";
cargoSha256 = "sha256-9VOJeRvyudZSCaUZ1J9gHMEoWXEnEhCZPxvfYGRKzj0=";
nativeBuildInputs = [ cmake ];
buildInputs = lib.optionals stdenv.isDarwin [
libiconv
CoreFoundation
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";

View File

@ -5936,9 +5936,7 @@ with pkgs;
cpuminer = callPackage ../tools/misc/cpuminer { };
crabz = callPackage ../tools/compression/crabz {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
crabz = callPackage ../tools/compression/crabz { };
ethash = callPackage ../development/libraries/ethash { };