at 22.05-pre 45 lines 1.2 kB view raw
1{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, glib, util-linux, scowl }: 2 3stdenv.mkDerivation rec { 4 pname = "halfempty"; 5 version = "0.40"; 6 7 src = fetchFromGitHub { 8 owner = "googleprojectzero"; 9 repo = pname; 10 rev = "v${version}"; 11 sha256 = "sha256-YGq6fneAMo2jCpLPrjzRJ0eeOsStKaK5L+lwQfqcfpY="; 12 }; 13 14 nativeBuildInputs = [ pkg-config util-linux ]; 15 buildInputs = [ glib ]; 16 17 enableParallelBuilding = true; 18 19 patches = [ 20 (fetchpatch { 21 name = "fix-bash-specific-syntax.patch"; 22 url = "https://github.com/googleprojectzero/halfempty/commit/ad15964d0fcaba12e5aca65c8935ebe3f37d7ea3.patch"; 23 sha256 = "sha256:0hgdci0wwi5wyw8i57w0545cxjmsmswm1y6g4vhykap0y40zizav"; 24 }) 25 ]; 26 27 postPatch = '' 28 substituteInPlace test/Makefile \ 29 --replace '/usr/share/dict/words' '${scowl}/share/dict/words.txt' 30 ''; 31 32 installPhase = '' 33 install -vDt $out/bin halfempty 34 ''; 35 36 doCheck = true; 37 checkTarget = "test"; 38 39 meta = { 40 description = "Fast, parallel test case minimization tool"; 41 homepage = "https://github.com/googleprojectzero/halfempty/"; 42 maintainers = with lib.maintainers; [ fpletz ]; 43 license = with lib.licenses; [ asl20 ]; 44 }; 45}