1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pythonOlder,
6 cryptography,
7 jinja2,
8 librouteros,
9 mako,
10 packaging,
11 passlib,
12 pyyaml,
13 requests,
14 rtoml,
15 setuptools,
16 tomlkit,
17 pytestCheckHook,
18 versionCheckHook,
19}:
20
21let
22 version = "4.23.1";
23in
24buildPythonPackage {
25 pname = "bundlewrap";
26 inherit version;
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "bundlewrap";
31 repo = "bundlewrap";
32 tag = version;
33 hash = "sha256-Nzfx2L/FlYXQcbKq/cuRZ+PWnjv4HDld9q01nwQ1sA8=";
34 };
35
36 build-system = [ setuptools ];
37 dependencies = [
38 cryptography
39 jinja2
40 mako
41 packaging
42 passlib
43 pyyaml
44 requests
45 tomlkit
46 librouteros
47 ]
48 ++ lib.optionals (pythonOlder "3.11") [ rtoml ];
49
50 pythonImportsCheck = [ "bundlewrap" ];
51
52 nativeCheckInputs = [
53 pytestCheckHook
54 versionCheckHook
55 ];
56 versionCheckProgram = "${placeholder "out"}/bin/bw";
57 versionCheckProgramArg = "--version";
58
59 enabledTestPaths = [
60 # only unit tests as integration tests need a OpenSSH client/server setup
61 "tests/unit"
62 ];
63
64 meta = {
65 homepage = "https://bundlewrap.org/";
66 description = "Easy, Concise and Decentralized Config management with Python";
67 changelog = "https://github.com/bundlewrap/bundlewrap/blob/${version}/CHANGELOG.md";
68 mainProgram = "bw";
69 license = [ lib.licenses.gpl3 ];
70 maintainers = with lib.maintainers; [ wamserma ];
71 };
72}