aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/tools/halfempty/default.nix
blob: c8c267f9187246c403151c513af62d73e457f0ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ lib, stdenv, fetchFromGitHub, pkgconfig, glib, util-linux, scowl }:

stdenv.mkDerivation rec {
  pname = "halfempty";
  version = "0.30";

  src = fetchFromGitHub {
    owner = "googleprojectzero";
    repo = pname;
    rev = "v${version}";
    sha256 = "0838pw0ccjvlxmjygzrnppz1fx1a10vjzdgjbxgb4wgpqjr8v6vc";
  };

  nativeBuildInputs = [ pkgconfig util-linux ];
  buildInputs = [ glib ];

  enableParallelBuilding = true;

  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 ];
  };
}