lol

Merge pull request #303059 from fabaff/credstash-refactor

python312Packages.credstash: refactor

authored by

Fabian Affolter and committed by
GitHub
c15b7df7 a8eaee11

+40 -11
+40 -11
pkgs/development/python-modules/credstash/default.nix
··· 1 - { lib, buildPythonPackage, fetchPypi, cryptography, boto3, pyyaml, docutils, pytest, fetchpatch }: 1 + { 2 + lib, 3 + boto3, 4 + buildPythonPackage, 5 + cryptography, 6 + docutils, 7 + fetchFromGitHub, 8 + fetchpatch, 9 + pytestCheckHook, 10 + pythonOlder, 11 + pyyaml, 12 + setuptools, 13 + }: 2 14 3 15 buildPythonPackage rec { 4 16 pname = "credstash"; 5 17 version = "1.17.1"; 6 - format = "setuptools"; 18 + pyproject = true; 19 + 20 + disabled = pythonOlder "3.7"; 7 21 8 - src = fetchPypi { 9 - inherit pname version; 10 - sha256 = "6c04e8734ef556ab459018da142dd0b244093ef176b3be5583e582e9a797a120"; 22 + src = fetchFromGitHub { 23 + owner = "fugue"; 24 + repo = "credstash"; 25 + rev = "refs/tags/v${version}"; 26 + hash = "sha256-a6OzffGt5piHgi0AWEXJED0R/+8RETh/9hYJi/lUVu0="; 11 27 }; 12 28 13 29 patches = [ 30 + # setup_requires -> tests_requires for pytest 14 31 (fetchpatch { 15 32 url = "https://github.com/fugue/credstash/commit/9c02ee43ed6e37596cafbca2fe80c532ec19d2d8.patch"; 16 - sha256 = "dlybrpfLK+PqwWWhH9iXgXHYysZGmcZAFGWNOwsG0xA="; 33 + hash = "sha256-dlybrpfLK+PqwWWhH9iXgXHYysZGmcZAFGWNOwsG0xA="; 17 34 }) 18 35 ]; 19 36 # The install phase puts an executable and a copy of the library it imports in ··· 24 41 # file ensures that Python imports the module from site-packages library. 25 42 postInstall = "rm $out/bin/credstash.py"; 26 43 27 - nativeBuildInputs = [ pytest ]; 44 + build-system = [ setuptools ]; 45 + 46 + dependencies = [ 47 + boto3 48 + cryptography 49 + docutils 50 + pyyaml 51 + ]; 28 52 29 - propagatedBuildInputs = [ cryptography boto3 pyyaml docutils ]; 53 + nativeBuildInputs = [ pytestCheckHook ]; 30 54 31 - # No tests in archive 32 - doCheck = false; 55 + disabledTestPaths = [ 56 + # Tests require a region 57 + "integration_tests/test_credstash_lib.py" 58 + "tests/key_service_test.py" 59 + ]; 33 60 34 61 meta = with lib; { 35 62 description = "A utility for managing secrets in the cloud using AWS KMS and DynamoDB"; 36 - mainProgram = "credstash"; 37 63 homepage = "https://github.com/LuminalOSS/credstash"; 64 + changelog = "https://github.com/fugue/credstash/releases/tag/v${version}"; 38 65 license = licenses.asl20; 66 + maintainers = with maintainers; [ ]; 67 + mainProgram = "credstash"; 39 68 }; 40 69 }