at 23.11-beta 1.2 kB view raw
1{ lib 2, asn1crypto 3, buildPythonPackage 4, fetchFromGitHub 5, importlib-metadata 6, pytest-mock 7, pytestCheckHook 8, pythonOlder 9, setuptools 10, wheel 11}: 12 13buildPythonPackage rec { 14 pname = "scramp"; 15 version = "1.4.4"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "tlocke"; 22 repo = "scramp"; 23 rev = version; 24 hash = "sha256-WOyv1fLSXG7p+WKs2QSwlsh8FSK/lxp6I1hPY0VIkKo="; 25 }; 26 27 nativeBuildInputs = [ 28 setuptools 29 wheel 30 ]; 31 32 propagatedBuildInputs = [ 33 asn1crypto 34 ] ++ lib.optionals (pythonOlder "3.8") [ 35 importlib-metadata 36 ]; 37 38 nativeCheckInputs = [ 39 pytest-mock 40 pytestCheckHook 41 ]; 42 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 ''; 49 50 pythonImportsCheck = [ 51 "scramp" 52 ]; 53 54 disabledTests = [ 55 "test_readme" 56 ]; 57 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 }; 64}