1 { lib, python3, fetchFromGitHub }:
2 python3.pkgs.buildPythonApplication rec {
3 pname = "perfect-hash";
6 # Archive on pypi does not contain examples, which are very helpful to
7 # understand how to use this program, so we use git source.
8 src = fetchFromGitHub {
10 repo = "perfect-hash";
12 sha256 = "0gkc3n613hl0q4jknrh2nm1n96j97p36q9jjgarb9d8yii9q7792";
16 mkdir -p $out/share/doc/perfect-hash
17 cp README.md $out/share/doc/perfect-hash
18 cp -r examples $out/share/doc/perfect-hash
22 description = "Minimal perfect hash function generator";
23 mainProgram = "perfect-hash";
25 Generate a minimal perfect hash function for a given set of keys.
26 A given code template is filled with parameters, such that the
27 output is code which implements the hash function. Templates can
28 easily be constructed for any programming language.
30 license = licenses.bsd3;
31 maintainers = [ maintainers.kaction ];
33 homepage = "https://github.com/ilanschnell/perfect-hash";
34 platforms = platforms.unix;