Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / scramp / default.nix
blobaa6013589cd3329b431daae20988ba17764026c9
1 { lib
2 , asn1crypto
3 , buildPythonPackage
4 , fetchFromGitHub
5 , importlib-metadata
6 , pytest-mock
7 , pytestCheckHook
8 , pythonOlder
9 , setuptools
10 , wheel
13 buildPythonPackage rec {
14   pname = "scramp";
15   version = "1.4.4";
16   format = "pyproject";
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "tlocke";
22     repo = "scramp";
23     rev = version;
24     hash = "sha256-WOyv1fLSXG7p+WKs2QSwlsh8FSK/lxp6I1hPY0VIkKo=";
25   };
27   nativeBuildInputs = [
28     setuptools
29     wheel
30   ];
32   propagatedBuildInputs = [
33     asn1crypto
34   ] ++ lib.optionals (pythonOlder "3.8") [
35     importlib-metadata
36   ];
38   nativeCheckInputs = [
39     pytest-mock
40     pytestCheckHook
41   ];
43   postPatch = ''
44     # Upstream uses versioningit to set the version
45     sed -i "/versioningit >=/d" pyproject.toml
46     sed -i '/^name =.*/a version = "${version}"' pyproject.toml
47     sed -i "/dynamic =/d" pyproject.toml
48   '';
50   pythonImportsCheck = [
51     "scramp"
52   ];
54   disabledTests = [
55     "test_readme"
56   ];
58   meta = with lib; {
59     description = "Implementation of the SCRAM authentication protocol";
60     homepage = "https://github.com/tlocke/scramp";
61     license = licenses.mit;
62     maintainers = with maintainers; [ jonringer ];
63   };