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