diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2020-12-08 04:48:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 04:48:40 +0100 |
commit | b18d45b41c0312de6f47d7a2d45e649583d9fa7e (patch) | |
tree | 314b9225e7e48ba87e4cb7636f09ddfdf7c7c6ee /pkgs | |
parent | eb0c3da568610cfd2da0d34e8e1d68156cb5a75e (diff) | |
parent | f825a02eb1dd103c53793578bea9a97563d8d1f3 (diff) |
Merge pull request #97823 from KAction/perfect-hash
perfect-hash: init at 0.4.1
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/tools/misc/perfect-hash/default.nix | 35 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/perfect-hash/default.nix b/pkgs/development/tools/misc/perfect-hash/default.nix new file mode 100644 index 000000000000..4e405413e3ae --- /dev/null +++ b/pkgs/development/tools/misc/perfect-hash/default.nix @@ -0,0 +1,35 @@ +{ stdenv, python3, fetchFromGitHub }: +python3.pkgs.buildPythonApplication rec { + pname = "perfect-hash"; + version = "0.4.1"; + + # Archive on pypi does not contain examples, which are very helpful to + # understand how to use this program, so we use git source. + src = fetchFromGitHub { + owner = "ilanschnell"; + repo = "perfect-hash"; + rev = version; + sha256 = "0gkc3n613hl0q4jknrh2nm1n96j97p36q9jjgarb9d8yii9q7792"; + }; + + postInstall = '' + mkdir -p $out/share/doc/perfect-hash + cp README.md $out/share/doc/perfect-hash + cp -r examples $out/share/doc/perfect-hash + ''; + + meta = with stdenv.lib; { + description = "Minimal perfect hash function generator"; + longDescription = '' + Generate a minimal perfect hash function for a given set of keys. + A given code template is filled with parameters, such that the + output is code which implements the hash function. Templates can + easily be constructed for any programming language. + ''; + license = licenses.bsd3; + maintainers = [ maintainers.kaction ]; + + homepage = "https://github.com/ilanschnell/perfect-hash"; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ca927c7dead8..a29c615d0d2e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11829,6 +11829,8 @@ in pax-rs = callPackage ../development/tools/pax-rs { }; + perfect-hash = callPackage ../development/tools/misc/perfect-hash { }; + peg = callPackage ../development/tools/parsing/peg { }; pgcli = pkgs.python3Packages.pgcli; |