nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 fasteners,
6 jinja2,
7 pbr,
8 python-jenkins,
9 pyyaml,
10 six,
11 stevedore,
12 pytestCheckHook,
13 setuptools,
14 testtools,
15 pytest-mock,
16 nixosTests,
17}:
18
19buildPythonPackage (finalAttrs: {
20 pname = "jenkins-job-builder";
21 version = "6.4.4";
22 pyproject = true;
23
24 # forge at opendev.org does not provide release tarballs
25 src = fetchPypi {
26 pname = "jenkins_job_builder";
27 inherit (finalAttrs) version;
28 hash = "sha256-7PpCDpe3KLRpt+R/Nu+qxdDxLKWVqTiCPK3j+nNaum8=";
29 };
30
31 postPatch = ''
32 export HOME=$(mktemp -d)
33 '';
34
35 build-system = [ setuptools ];
36
37 dependencies = [
38 pbr
39 python-jenkins
40 pyyaml
41 six
42 stevedore
43 fasteners
44 jinja2
45 ];
46
47 nativeCheckInputs = [
48 pytestCheckHook
49 testtools
50 pytest-mock
51 ];
52
53 passthru.tests = { inherit (nixosTests) jenkins; };
54
55 meta = {
56 description = "Jenkins Job Builder is a system for configuring Jenkins jobs using simple YAML files stored in Git";
57 mainProgram = "jenkins-jobs";
58 homepage = "https://jenkins-job-builder.readthedocs.io/en/latest/";
59 license = lib.licenses.asl20;
60 maintainers = with lib.maintainers; [ bot-wxt1221 ];
61 };
62})