hck: 0.6.7 -> 0.7.0

This commit is contained in:
figsoda 2021-11-21 19:28:13 -05:00
parent 7f9782cae2
commit b1cfb04d5e

View File

@ -9,21 +9,30 @@
rustPlatform.buildRustPackage rec {
pname = "hck";
version = "0.6.7";
version = "0.7.0";
src = fetchFromGitHub {
owner = "sstadick";
repo = pname;
rev = "v${version}";
sha256 = "sha256-m4YVz3kh4nOkdf6PbbyxjKacUVKdFQet76CMrFYMRHI=";
sha256 = "sha256-BP1B1FlN+9qpkqv4WfT7OSyPCb7K47uxJQKXAW1Kkck=";
};
cargoSha256 = "sha256-4z1kHSev+5+0wpYFEGvvafB50Wz1wr6zObCjvHR9FPU=";
cargoSha256 = "sha256-Lp0VGt6z9mE8b9Fi6Fz3MjmHmbr9Az72D7BzOju9uOI=";
nativeBuildInputs = [ cmake ];
buildInputs = lib.optionals stdenv.isDarwin [ 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 close to drop in replacement for cut that can use a regex delimiter instead of a fixed string";
homepage = "https://github.com/sstadick/hck";