python312Packages.types-aiobotocore: 2.15.2 -> 2.15.2.post3 (#361801)
[NixPkgs.git] / pkgs / by-name / tr / triehash / package.nix
blobe9d8a92e2c2e312a93d57f8d9f8c83046ba2c453
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , perlPackages
5 }:
7 stdenv.mkDerivation rec {
8   pname = "triehash";
9   version = "0.3";
11   src = fetchFromGitHub {
12     owner = "julian-klode";
13     repo = "triehash";
14     rev = "debian/0.3-3";
15     hash = "sha256-LxVcYj2WKHbhNu5x/DFkxQPOYrVkNvwiE/qcODq52Lc=";
16   };
18   nativeBuildInputs = [
19     perlPackages.perl
20   ];
22   postPatch = ''
23     patchShebangs triehash.pl
24   '';
26   dontConfigure = true;
28   dontBuild = true;
30   installPhase = ''
31     runHook preInstall
33     install -d $out/bin $out/share/doc/triehash/ $out/share/triehash/
34     install triehash.pl $out/bin/triehash
35     install README.md $out/share/doc/triehash/
36     cp -r tests/ $out/share/triehash/tests/
38     runHook postInstall
39   '';
41   meta = with lib; {
42     homepage = "https://github.com/julian-klode/triehash";
43     description = "Order-preserving minimal perfect hash function generator";
44     license = with licenses; mit;
45     maintainers = with maintainers; [ AndersonTorres ];
46     platforms = perlPackages.perl.meta.platforms;
47     mainProgram = "triehash";
48   };