nixpkgs-suyu/pkgs/development/tools/halfempty/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, glib, util-linux, scowl }:
2020-02-01 13:54:05 +01:00
stdenv.mkDerivation rec {
pname = "halfempty";
2021-01-19 00:52:17 +01:00
version = "0.40";
2020-02-01 13:54:05 +01:00
src = fetchFromGitHub {
owner = "googleprojectzero";
repo = pname;
rev = "v${version}";
2021-01-19 00:52:17 +01:00
sha256 = "sha256-YGq6fneAMo2jCpLPrjzRJ0eeOsStKaK5L+lwQfqcfpY=";
2020-02-01 13:54:05 +01:00
};
nativeBuildInputs = [ pkg-config util-linux ];
2020-02-01 13:54:05 +01:00
buildInputs = [ glib ];
enableParallelBuilding = true;
patches = [
(fetchpatch {
name = "fix-bash-specific-syntax.patch";
url = "https://github.com/googleprojectzero/halfempty/commit/ad15964d0fcaba12e5aca65c8935ebe3f37d7ea3.patch";
sha256 = "sha256:0hgdci0wwi5wyw8i57w0545cxjmsmswm1y6g4vhykap0y40zizav";
})
];
2020-02-01 13:54:05 +01:00
postPatch = ''
substituteInPlace test/Makefile \
--replace '/usr/share/dict/words' '${scowl}/share/dict/words.txt'
'';
installPhase = ''
install -vDt $out/bin halfempty
'';
doCheck = true;
checkTarget = "test";
meta = {
description = "Fast, parallel test case minimization tool";
homepage = "https://github.com/googleprojectzero/halfempty/";
maintainers = with lib.maintainers; [ fpletz ];
license = with lib.licenses; [ asl20 ];
};
}