2019-08-21 18:07:24 +01:00
|
|
|
{ stdenv, fetchFromGitHub, openssl, flex, bison, pkgconfig, groff, libxml2, utillinux
|
|
|
|
, file, libtool, which, boost, autoreconfHook
|
|
|
|
}:
|
2014-09-05 09:18:33 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-21 18:07:24 +01:00
|
|
|
pname = "torque";
|
|
|
|
version = "6.1.3h2";
|
2014-09-05 09:18:33 +01:00
|
|
|
|
2019-08-21 18:07:24 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "adaptivecomputing";
|
|
|
|
repo = pname;
|
|
|
|
# branch 6.1.3h2, as they aren't pushing tags
|
|
|
|
# https://github.com/adaptivecomputing/torque/issues/467
|
|
|
|
rev = "458883319157cfc5c509046d09f9eb8e68e8d398";
|
|
|
|
sha256 = "1b56bc5j9wg87kcywzmhf7234byyrwax9v1pqsr9xmv2x7saakrr";
|
2014-09-05 09:18:33 +01:00
|
|
|
};
|
|
|
|
|
2019-08-21 18:07:24 +01:00
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig flex bison libxml2 ];
|
|
|
|
buildInputs = [
|
|
|
|
openssl groff libxml2 utillinux libtool
|
|
|
|
which boost
|
|
|
|
];
|
2014-09-05 09:18:33 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-03-11 18:00:58 +00:00
|
|
|
# added to fix build with gcc7
|
2019-08-21 18:07:24 +01:00
|
|
|
NIX_CFLAGS_COMPILE = [
|
|
|
|
"-Wno-error" "-fpermissive"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.am \
|
|
|
|
--replace "contrib/init.d contrib/systemd" ""
|
|
|
|
substituteInPlace src/cmds/Makefile.am \
|
|
|
|
--replace "/etc/" "$out/etc/"
|
|
|
|
'';
|
2018-03-11 18:00:58 +00:00
|
|
|
|
2014-09-05 09:18:33 +01:00
|
|
|
preConfigure = ''
|
2019-08-21 18:07:24 +01:00
|
|
|
substituteInPlace ./configure \
|
|
|
|
--replace '/usr/bin/file' '${file}/bin/file'
|
2015-05-30 17:06:26 +01:00
|
|
|
|
2019-08-21 18:07:24 +01:00
|
|
|
# fix broken libxml2 detection
|
|
|
|
sed -i '/xmlLib\=/c\xmlLib=xml2' ./configure
|
2015-05-30 17:06:26 +01:00
|
|
|
|
2019-08-21 18:07:24 +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
|
2014-09-05 09:18:33 +01:00
|
|
|
|
2019-08-21 18:07:24 +01:00
|
|
|
for f in $(find ./ -name Makefile.in); do
|
|
|
|
echo patching $f...
|
|
|
|
sed -i $f -e '/PBS_MKDIRS/d' -e '/chmod u+s/d'
|
|
|
|
done
|
2017-06-16 13:27:23 +01:00
|
|
|
|
2019-08-21 18:07:24 +01:00
|
|
|
patchShebangs buildutils
|
2014-09-05 09:18:33 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
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;
|
2019-08-21 18:07:24 +01:00
|
|
|
license = "TORQUEv1.1";
|
2014-09-05 09:18:33 +01:00
|
|
|
};
|
|
|
|
}
|