at 23.11-beta 37 lines 971 B view raw
1{ lib, stdenv, fetchFromGitHub }: 2 3stdenv.mkDerivation rec { 4 version = "0.4.5"; 5 pname = "theft"; 6 7 src = fetchFromGitHub { 8 owner = "silentbicycle"; 9 repo = "theft"; 10 rev = "v${version}"; 11 sha256 = "1n2mkawfl2bpd4pwy3mdzxwlqjjvb5bdrr2x2gldlyqdwbk7qjhd"; 12 }; 13 14 preConfigure = "patchShebangs ./scripts/mk_bits_lut"; 15 16 doCheck = true; 17 checkTarget = "test"; 18 19 installFlags = [ "PREFIX=$(out)" ]; 20 21 # fix the libtheft.pc file to use the right installation 22 # directory. should be fixed upstream, too 23 postInstall = '' 24 install -m644 vendor/greatest.h $out/include/ 25 26 substituteInPlace $out/lib/pkgconfig/libtheft.pc \ 27 --replace "/usr/local" "$out" 28 ''; 29 30 meta = with lib; { 31 description = "A C library for property-based testing"; 32 homepage = "https://github.com/silentbicycle/theft/"; 33 platforms = platforms.unix; 34 license = licenses.isc; 35 maintainers = with maintainers; [ kquick thoughtpolice ]; 36 }; 37}