diff options
author | Markus Kowalewski <markus.kowalewski@gmail.com> | 2020-06-10 10:55:05 +0200 |
---|---|---|
committer | Markus Kowalewski <markus.kowalewski@gmail.com> | 2020-06-10 12:43:37 +0200 |
commit | 5d8f61f3bfb8f93751c1e455f51393f10d507e0f (patch) | |
tree | a999995fde40b10d7f1f2a5b46e380e949921a98 /pkgs/servers/computing | |
parent | af4491f26c7b03e9952ebb697dc4fdfebb1dfa95 (diff) |
slurm: bugifx, add su/echo paths
slurmd requires su and echo to work with "--get-user-env". If slurmd
does not find /bin/su or /bin/echo, it crashes.
Diffstat (limited to 'pkgs/servers/computing')
-rw-r--r-- | pkgs/servers/computing/slurm/default.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/servers/computing/slurm/default.nix b/pkgs/servers/computing/slurm/default.nix index cd0d67ecfed6..9e610579d739 100644 --- a/pkgs/servers/computing/slurm/default.nix +++ b/pkgs/servers/computing/slurm/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, pkgconfig, libtool, curl -, python, munge, perl, pam, openssl, zlib +, python, munge, perl, pam, openssl, zlib, shadow, coreutils , ncurses, libmysqlclient, gtk2, lua, hwloc, numactl , readline, freeipmi, libssh2, xorg, lz4, rdma-core # enable internal X11 support via libssh2 @@ -22,10 +22,13 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - prePatch = stdenv.lib.optional enableX11 '' + prePatch = '' + substituteInPlace src/common/env.c \ + --replace "/bin/echo" "${coreutils}/bin/echo" + '' + (stdenv.lib.optionalString enableX11 '' substituteInPlace src/common/x11_util.c \ --replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"' - ''; + ''); # nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode' # https://groups.google.com/forum/#!topic/slurm-devel/QHOajQ84_Es @@ -36,7 +39,7 @@ stdenv.mkDerivation rec { buildInputs = [ curl python munge perl pam openssl zlib libmysqlclient ncurses gtk2 lz4 rdma-core - lua hwloc numactl readline freeipmi + lua hwloc numactl readline freeipmi shadow.su ] ++ stdenv.lib.optionals enableX11 [ libssh2 xorg.xauth ]; configureFlags = with stdenv.lib; |