1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 ansible-core,
11
12 # tests
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "ansible-vault-rw";
18 version = "2.1.0";
19 pyproject = true;
20
21 src = fetchPypi {
22 pname = "ansible-vault";
23 inherit version;
24 hash = "sha256-XOj9tUcPFEm3a/B64qvFZIDa1INWrkBchbaG77ZNvV4";
25 };
26
27 nativeBuildInputs = [ setuptools ];
28
29 propagatedBuildInputs = [ ansible-core ];
30
31 # Otherwise tests will fail to create directory
32 # Permission denied: '/homeless-shelter'
33 preCheck = ''
34 export HOME=$(mktemp -d)
35 '';
36
37 # no tests in sdist, no 2.1.0 tag on git
38 doCheck = false;
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 meta = with lib; {
43 description = "This project aim to R/W an ansible-vault yaml file";
44 homepage = "https://github.com/tomoh1r/ansible-vault";
45 changelog = "https://github.com/tomoh1r/ansible-vault/blob/master/CHANGES.txt";
46 license = licenses.gpl3;
47 maintainers = with maintainers; [ StillerHarpo ];
48 };
49}