commit 40900df40734f821207a5d1f5a2ba839eab087b3 parent 99eb99da3a994ea6a049b5d9dee60645ff102c2f Author: Nikolay Korotkiy <sikmir@disroot.org> Date: Thu, 2 Jun 2022 12:52:33 +0300 Add cykhash Diffstat:
M | pkgs/default.nix | | | 1 | + |
A | pkgs/osm/cykhash/default.nix | | | 30 | ++++++++++++++++++++++++++++++ |
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -340,6 +340,7 @@ lib.makeScope newScope ( ### OSM + cykhash = callPackage ./osm/cykhash { }; imposm = callPackage ./osm/imposm { }; map-machine = callPackage ./osm/map-machine { }; map-stylizer = callPackage ./osm/map-stylizer { }; diff --git a/pkgs/osm/cykhash/default.nix b/pkgs/osm/cykhash/default.nix @@ -0,0 +1,30 @@ +{ lib, python3Packages, fetchFromGitHub }: + +python3Packages.buildPythonPackage rec { + pname = "cykhash"; + version = "2.0.0"; + + src = fetchFromGitHub { + owner = "realead"; + repo = pname; + rev = "v${version}"; + hash = "sha256-Bw85RJudoGNa2GrEwxGaln93T7c2YyRakWZcMJAJwUU="; + }; + + nativeBuildInputs = with python3Packages; [ cython ]; + + checkInputs = with python3Packages; [ numpy pytestCheckHook ]; + + preCheck = '' + export HOME=$TMPDIR + ''; + + pytestFlagsArray = [ "tests/unit_tests" ]; + + meta = with lib; { + description = "cython wrapper for khash"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + }; +}