2021-11-08 12:44:42 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, glib, util-linux, scowl }:
|
2020-02-01 12:54:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "halfempty";
|
2021-01-18 23:52:17 +00:00
|
|
|
version = "0.40";
|
2020-02-01 12:54:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "googleprojectzero";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-01-18 23:52:17 +00:00
|
|
|
sha256 = "sha256-YGq6fneAMo2jCpLPrjzRJ0eeOsStKaK5L+lwQfqcfpY=";
|
2020-02-01 12:54:05 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config util-linux ];
|
2020-02-01 12:54:05 +00:00
|
|
|
buildInputs = [ glib ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-11-08 12:44:42 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-bash-specific-syntax.patch";
|
|
|
|
url = "https://github.com/googleprojectzero/halfempty/commit/ad15964d0fcaba12e5aca65c8935ebe3f37d7ea3.patch";
|
|
|
|
sha256 = "sha256:0hgdci0wwi5wyw8i57w0545cxjmsmswm1y6g4vhykap0y40zizav";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-02-01 12:54:05 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|