anchor.diff:    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;
  
positive.code: 
    outputs = [ "out" "dev" ];
  
    prePatch = stdenv.lib.optional 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
  
negative.code: { stdenv, fetchFromGitHub, pkgconfig, libtool, curl
  , 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
  