mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 05:00:19 +00:00
commit
52049b46b9
@ -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";
|
||||
|
@ -5940,9 +5940,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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user