2018-05-26 10:51:45 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libtool, curl
|
|
|
|
, python, munge, perl, pam, openssl
|
2016-09-11 22:24:51 +01:00
|
|
|
, ncurses, mysql, gtk2, lua, hwloc, numactl
|
2018-05-26 10:51:45 +01:00
|
|
|
, readline, freeipmi, libssh2, xorg
|
|
|
|
# enable internal X11 support via libssh2
|
|
|
|
, enableX11 ? true
|
2016-05-27 22:01:16 +01:00
|
|
|
}:
|
2015-02-28 17:11:13 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-07-13 02:35:54 +01:00
|
|
|
name = "slurm-${version}";
|
2018-03-29 17:14:56 +01:00
|
|
|
version = "17.11.5";
|
2015-02-28 17:11:13 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-12-15 20:33:06 +00:00
|
|
|
url = "https://download.schedmd.com/slurm/${name}.tar.bz2";
|
2018-03-29 17:14:56 +01:00
|
|
|
sha256 = "07ghyyz12k4rksm06xf7dshwp1ndm13zphdbqja99401q4xwbx9r";
|
2015-02-28 17:11:13 +00:00
|
|
|
};
|
|
|
|
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2016-05-28 00:29:42 +01:00
|
|
|
|
2018-05-26 10:51:45 +01:00
|
|
|
prePatch = stdenv.lib.optional enableX11 ''
|
|
|
|
substituteInPlace src/common/x11_util.c \
|
|
|
|
--replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"'
|
|
|
|
'';
|
|
|
|
|
2017-07-13 02:35:54 +01:00
|
|
|
# nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode'
|
|
|
|
# https://groups.google.com/forum/#!topic/slurm-devel/QHOajQ84_Es
|
|
|
|
# this doesn't fix tests completely at least makes slurmd to launch
|
|
|
|
hardeningDisable = [ "bindnow" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig libtool ];
|
2016-05-27 22:01:16 +01:00
|
|
|
buildInputs = [
|
2018-05-26 10:51:45 +01:00
|
|
|
curl python munge perl pam openssl
|
|
|
|
mysql.connector-c ncurses gtk2
|
|
|
|
lua hwloc numactl readline freeipmi
|
|
|
|
] ++ stdenv.lib.optionals enableX11 [ libssh2 xorg.xauth ];
|
2015-02-28 17:11:13 +00:00
|
|
|
|
2018-05-26 10:51:45 +01:00
|
|
|
configureFlags = with stdenv.lib;
|
2015-12-19 01:07:09 +00:00
|
|
|
[ "--with-munge=${munge}"
|
2016-04-16 18:44:32 +01:00
|
|
|
"--with-ssl=${openssl.dev}"
|
2018-05-26 10:51:45 +01:00
|
|
|
"--with-hwloc=${hwloc.dev}"
|
|
|
|
"--with-freeipmi=${freeipmi}"
|
2016-05-27 22:01:16 +01:00
|
|
|
"--sysconfdir=/etc/slurm"
|
2018-05-26 10:51:45 +01:00
|
|
|
] ++ (optional (gtk2 == null) "--disable-gtktest")
|
|
|
|
++ (optional enableX11 "--with-libssh2=${libssh2.dev}");
|
|
|
|
|
2015-02-28 17:11:13 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
2017-07-13 02:35:54 +01:00
|
|
|
patchShebangs ./doc/html/shtml2html.py
|
|
|
|
patchShebangs ./doc/man/man2html.py
|
2015-02-28 17:11:13 +00:00
|
|
|
'';
|
|
|
|
|
2016-05-27 22:01:16 +01:00
|
|
|
postInstall = ''
|
|
|
|
rm -f $out/lib/*.la $out/lib/slurm/*.la
|
|
|
|
'';
|
|
|
|
|
2017-12-15 20:33:06 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-02-28 17:11:13 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.schedmd.com/;
|
|
|
|
description = "Simple Linux Utility for Resource Management";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.jagajaga ];
|
|
|
|
};
|
|
|
|
}
|