1{
2 lib,
3 pythonOlder,
4 fetchFromGitHub,
5 buildPythonPackage,
6 setuptools,
7 cython,
8 slurm,
9}:
10
11buildPythonPackage rec {
12 pname = "pyslurm";
13 version = "24.11.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 repo = "pyslurm";
20 owner = "PySlurm";
21 tag = "v${version}";
22 hash = "sha256-Uko4fgi080XWSseOBijzvzi0YtjuRIvH8qSKEWrpFG0=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 buildInputs = [
28 cython
29 slurm
30 ];
31
32 env = {
33 SLURM_LIB_DIR = "${lib.getLib slurm}/lib";
34 SLURM_INCLUDE_DIR = "${lib.getDev slurm}/include";
35 };
36
37 # Test cases need /etc/slurm/slurm.conf and require a working slurm installation
38 doCheck = false;
39
40 meta = with lib; {
41 homepage = "https://github.com/PySlurm/pyslurm";
42 description = "Python bindings to Slurm";
43 license = licenses.gpl2;
44 maintainers = with maintainers; [ bhipple ];
45 platforms = platforms.linux;
46 };
47}