at master 1.1 kB view raw
1{ 2 lib, 3 asn1crypto, 4 buildPythonPackage, 5 fetchFromGitHub, 6 hatchling, 7 pytest-mock, 8 pytestCheckHook, 9 pythonOlder, 10 versioningit, 11}: 12 13buildPythonPackage rec { 14 pname = "scramp"; 15 version = "1.4.5"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "tlocke"; 22 repo = "scramp"; 23 rev = version; 24 hash = "sha256-KpododRJ+CYRGBR7Sr5cVBhJvUwh9YmPERd/DAJqEcY="; 25 }; 26 27 build-system = [ 28 hatchling 29 versioningit 30 ]; 31 32 dependencies = [ asn1crypto ]; 33 34 nativeCheckInputs = [ 35 pytest-mock 36 pytestCheckHook 37 ]; 38 39 postPatch = '' 40 # Upstream uses versioningit to set the version 41 sed -i "/versioningit >=/d" pyproject.toml 42 sed -i '/^name =.*/a version = "${version}"' pyproject.toml 43 sed -i "/dynamic =/d" pyproject.toml 44 ''; 45 46 pythonImportsCheck = [ "scramp" ]; 47 48 disabledTests = [ "test_readme" ]; 49 50 meta = with lib; { 51 description = "Implementation of the SCRAM authentication protocol"; 52 homepage = "https://github.com/tlocke/scramp"; 53 license = licenses.mit; 54 maintainers = [ ]; 55 }; 56}