2015-05-30 17:06:26 +01:00
|
|
|
{ stdenv, fetchurl, openssl, flex, bison, pkgconfig, groff, libxml2, utillinux
|
|
|
|
, file, libtool, which }:
|
2014-09-05 09:18:33 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-05-30 17:06:26 +01:00
|
|
|
name = "torque-4.2.10";
|
2014-09-05 09:18:33 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "${name}.tar.gz";
|
2015-05-30 17:06:26 +01:00
|
|
|
url = "http://www.adaptivecomputing.com/index.php?wpfb_dl=2880";
|
|
|
|
sha256 = "1qpsk3bla6b6m7m0i1xpr183yj79liy3p34xhnz1grgq0776wg5l";
|
2014-09-05 09:18:33 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ openssl flex bison groff libxml2 utillinux libtool
|
2015-05-30 17:06:26 +01:00
|
|
|
which ];
|
2014-09-05 09:18:33 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-03-11 18:00:58 +00:00
|
|
|
# added to fix build with gcc7
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-fpermissive" ];
|
|
|
|
|
2014-09-05 09:18:33 +01:00
|
|
|
preConfigure = ''
|
2015-05-30 17:06:26 +01:00
|
|
|
substituteInPlace ./configure \
|
|
|
|
--replace '/usr/bin/file' '${file}/bin/file'
|
|
|
|
|
|
|
|
# fix broken libxml2 detection
|
|
|
|
sed -i '/xmlLib\=/c\xmlLib=xml2' ./configure
|
|
|
|
|
2014-09-05 09:18:33 +01:00
|
|
|
for s in fifo cray_t3e dec_cluster msic_cluster sgi_origin umn_cluster; do
|
|
|
|
substituteInPlace src/scheduler.cc/samples/$s/Makefile.in \
|
|
|
|
--replace "schedprivdir = " "schedprivdir = $out/"
|
|
|
|
done
|
|
|
|
|
|
|
|
for f in $(find ./ -name Makefile.in); do
|
|
|
|
echo patching $f...
|
2017-06-16 13:27:23 +01:00
|
|
|
sed -i $f -e '/PBS_MKDIRS/d' -e '/chmod u+s/d'
|
2014-09-05 09:18:33 +01:00
|
|
|
done
|
2017-06-16 13:27:23 +01:00
|
|
|
|
2014-09-05 09:18:33 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/sbin/* $out/bin/
|
|
|
|
rmdir $out/sbin
|
|
|
|
cp -v buildutils/pbs_mkdirs $out/bin/
|
|
|
|
cp -v torque.setup $out/bin/
|
|
|
|
chmod +x $out/bin/pbs_mkdirs $out/bin/torque.setup
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.adaptivecomputing.com/products/open-source/torque;
|
|
|
|
description = "Resource management system for submitting and controlling jobs on supercomputers, clusters, and grids";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|