perfect-hash: init at 0.4.1

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Dmitry Bogatov 2020-09-11 22:27:18 -04:00 committed by Dmitry Bogatov
parent 77cdb1f64f
commit f825a02eb1
2 changed files with 37 additions and 0 deletions

View File

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

View File

@ -11403,6 +11403,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;