nixpkgs/pkgs/tools/text/hck/default.nix

36 lines
916 B
Nix
Raw Normal View History

2021-09-03 02:05:16 +00:00
{ cmake
, fetchFromGitHub
, lib
, rustPlatform
, stdenv
, libiconv
, CoreFoundation
, Security
}:
2021-08-17 19:27:02 +00:00
rustPlatform.buildRustPackage rec {
pname = "hck";
2021-09-05 01:09:53 +00:00
version = "0.6.2";
2021-08-17 19:27:02 +00:00
src = fetchFromGitHub {
owner = "sstadick";
repo = pname;
rev = "v${version}";
2021-09-05 01:09:53 +00:00
sha256 = "1xjp56asfn37kr0fsrjkil20nf372q70cijqb5ll2sq2zwjnyyzn";
2021-08-17 19:27:02 +00:00
};
2021-09-05 01:09:53 +00:00
cargoSha256 = "12n33gwxcym5z5n762wmzcck4zmmn42kh04nwpdb3az4apghdp3z";
2021-09-03 02:05:16 +00:00
nativeBuildInputs = [ cmake ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv CoreFoundation Security ];
2021-08-17 19:27:02 +00:00
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";
changelog = "https://github.com/sstadick/hck/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit /* or */ unlicense ];
maintainers = with maintainers; [ figsoda ];
};
}