Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyslurm / default.nix
blobc960cfedfddecb2d3449d2622cbcc4c5671af7d9
1 { lib
2 , pythonOlder
3 , fetchFromGitHub
4 , fetchpatch
5 , buildPythonPackage
6 , cython
7 , slurm
8 }:
10 buildPythonPackage rec {
11   pname = "pyslurm";
12   version = "23.2.2";
13   format = "setuptools";
15   disabled = pythonOlder "3.6";
17   src = fetchFromGitHub {
18     repo = "pyslurm";
19     owner = "PySlurm";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-M8seh5pkw2OTiDU4O96D0Lg3+FrlB2w4ehy53kSxyoU=";
22   };
24   patches = [ (fetchpatch {
25     name = "remove-undeclared-KILL_JOB_ARRAY";
26     url = "https://github.com/PySlurm/pyslurm/commit/f7a7d8beb8ceb4e4c1b248bab2ebb995dcae77e2.patch";
27     hash = "sha256-kQLGiGzAhqP8Z6pObz9vdTRdITd12w7KuUDXsfyLIU8=";
28   })];
30   buildInputs = [ cython slurm ];
32   setupPyBuildFlags = [ "--slurm-lib=${lib.getLib slurm}/lib" "--slurm-inc=${lib.getDev slurm}/include" ];
34   # Test cases need /etc/slurm/slurm.conf and require a working slurm installation
35   doCheck = false;
37   meta = with lib; {
38     homepage = "https://github.com/PySlurm/pyslurm";
39     description = "Python bindings to Slurm";
40     license = licenses.gpl2;
41     maintainers = with maintainers; [ bhipple ];
42     platforms = platforms.linux;
43   };