diff options
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r-- | pkgs/tools/text/hck/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/tools/text/hck/default.nix b/pkgs/tools/text/hck/default.nix index 88ad2308913aa..87462d8d717fb 100644 --- a/pkgs/tools/text/hck/default.nix +++ b/pkgs/tools/text/hck/default.nix @@ -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"; |