@ -1,5 +1,9 @@
{ stdenv , fetchurl , pkgconfig , libtool , curl , python , munge , perl , pam , openssl
{ stdenv , fetchurl , pkgconfig , libtool , curl
, python , munge , perl , pam , openssl
, ncurses , mysql , gtk2 , lua , hwloc , numactl
, readline , freeipmi , libssh2 , xorg
# enable internal X11 support via libssh2
, enableX11 ? true
} :
stdenv . mkDerivation rec {
@ -13,6 +17,11 @@ stdenv.mkDerivation rec {
outputs = [ " o u t " " d e v " ] ;
prePatch = stdenv . lib . optional enableX11 ''
substituteInPlace src/common/x11_util.c \
- - replace ' " / u s r / b i n / x a u t h " ' ' " ${ xorg . xauth } / b i n / x a u t h " '
'' ;
# 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
@ -20,14 +29,20 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig libtool ] ;
buildInputs = [
curl python munge perl pam openssl mysql . connector-c ncurses gtk2 lua hwloc numactl
] ;
curl python munge perl pam openssl
mysql . connector-c ncurses gtk2
lua hwloc numactl readline freeipmi
] ++ stdenv . lib . optionals enableX11 [ libssh2 xorg . xauth ] ;
configureFlags =
configureFlags = with stdenv . lib ;
[ " - - w i t h - m u n g e = ${ munge } "
" - - w i t h - s s l = ${ openssl . dev } "
" - - w i t h - h w l o c = ${ hwloc . dev } "
" - - w i t h - f r e e i p m i = ${ freeipmi } "
" - - s y s c o n f d i r = / e t c / s l u r m "
] ++ stdenv . lib . optional ( gtk2 == null ) " - - d i s a b l e - g t k t e s t " ;
] ++ ( optional ( gtk2 == null ) " - - d i s a b l e - g t k t e s t " )
++ ( optional enableX11 " - - w i t h - l i b s s h 2 = ${ libssh2 . dev } " ) ;
preConfigure = ''
patchShebangs ./doc/html/shtml2html.py