1{ lib, buildPythonPackage, fetchPypi, fasteners
2, jinja2
3, pbr
4, python-jenkins
5, pyyaml
6, six
7, stevedore
8}:
9
10buildPythonPackage rec {
11 pname = "jenkins-job-builder";
12 version = "5.0.4";
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-+zrsfyi4I8venFGMKXDMUq+9+f7y6IY59y1/OJDExGs=";
17 };
18
19 postPatch = ''
20 # relax version constraint, https://storyboard.openstack.org/#!/story/2009723
21 substituteInPlace requirements.txt --replace 'PyYAML>=3.10.0,<6' 'PyYAML>=3.10.0'
22
23 # Allow building with setuptools from nixpkgs.
24 # Related: https://github.com/NixOS/nixpkgs/issues/238226.
25 substituteInPlace requirements.txt --replace 'setuptools<=65.7.0' 'setuptools'
26
27 export HOME=$TMPDIR
28 '';
29
30 propagatedBuildInputs = [ pbr python-jenkins pyyaml six stevedore fasteners jinja2 ];
31
32 # Need to fix test deps, relies on stestr and a few other packages that aren't available on nixpkgs
33 checkPhase = "$out/bin/jenkins-jobs --help";
34
35 meta = with lib; {
36 description = "Jenkins Job Builder is a system for configuring Jenkins jobs using simple YAML files stored in Git";
37 homepage = "https://docs.openstack.org/infra/jenkins-job-builder/";
38 license = licenses.asl20;
39 maintainers = with maintainers; [ ];
40 };
41
42}