Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / fnv-hash-fast / default.nix
blob01e57845d3bb1036838b4e3af8f47b6931120c6b
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , cython
5 , poetry-core
6 , setuptools
7 , wheel
8 , fnvhash
9 , pytestCheckHook
12 buildPythonPackage rec {
13   pname = "fnv-hash-fast";
14   version = "0.5.0";
15   format = "pyproject";
17   src = fetchFromGitHub {
18     owner = "bdraco";
19     repo = "fnv-hash-fast";
20     rev = "v${version}";
21     hash = "sha256-gAHCssJC6sTR6ftkQHrtF/5Nf9dXE4ykRhVusb0Gu3I=";
22   };
24   postPatch = ''
25     substituteInPlace pyproject.toml \
26       --replace "--cov=fnv_hash_fast --cov-report=term-missing:skip-covered" ""
27   '';
29   nativeBuildInputs = [
30     cython
31     poetry-core
32     setuptools
33     wheel
34   ];
36   propagatedBuildInputs = [
37     fnvhash
38   ];
40   pythonImportsCheck = [
41     "fnv_hash_fast"
42   ];
44   nativeCheckInputs = [
45     pytestCheckHook
46   ];
48   meta = with lib; {
49     description = "A fast version of fnv1a";
50     homepage = "https://github.com/bdraco/fnv-hash-fast";
51     changelog = "https://github.com/bdraco/fnv-hash-fast/blob/${src.rev}/CHANGELOG.md";
52     license = licenses.mit;
53     maintainers = with maintainers; [ hexa ];
54   };