nixpkgs/pkgs/servers/computing/torque/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

100 lines
2.1 KiB
Nix
Raw Normal View History

{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
flex,
bison,
openssl,
groff,
libxml2,
util-linux,
libtool,
which,
coreutils,
boost,
zlib,
2019-08-21 17:07:24 +00:00
}:
stdenv.mkDerivation {
2019-08-21 17:07:24 +00:00
pname = "torque";
version = "6.1.3h2";
2019-08-21 17:07:24 +00:00
src = fetchFromGitHub {
owner = "adaptivecomputing";
repo = "torque";
2019-08-21 17:07:24 +00:00
# branch 6.1.3h2, as they aren't pushing tags
# https://github.com/adaptivecomputing/torque/issues/467
rev = "458883319157cfc5c509046d09f9eb8e68e8d398";
sha256 = "1b56bc5j9wg87kcywzmhf7234byyrwax9v1pqsr9xmv2x7saakrr";
};
2019-08-21 17:07:24 +00:00
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
pkg-config
flex
bison
libxml2
];
2019-08-21 17:07:24 +00:00
buildInputs = [
openssl
groff
libxml2
util-linux
libtool
which
boost
zlib
2019-08-21 17:07:24 +00:00
];
enableParallelBuilding = true;
2018-03-11 18:00:58 +00:00
# added to fix build with gcc7
env.NIX_CFLAGS_COMPILE = "-Wno-error -fpermissive";
2019-08-21 17:07:24 +00:00
postPatch = ''
substituteInPlace Makefile.am \
--replace-fail "contrib/init.d contrib/systemd" ""
2019-08-21 17:07:24 +00:00
substituteInPlace src/cmds/Makefile.am \
--replace-fail "/etc/" "$out/etc/"
2020-04-26 21:32:45 +00:00
substituteInPlace src/mom_rcp/pathnames.h \
--replace-fail /bin/cp ${coreutils}/bin/cp
2020-04-26 21:32:45 +00:00
substituteInPlace src/resmom/requests.c \
--replace-fail /bin/cp ${coreutils}/bin/cp
2019-08-21 17:07:24 +00:00
'';
2018-03-11 18:00:58 +00:00
preConfigure = ''
2019-08-21 17:07:24 +00:00
# fix broken libxml2 detection
sed -i '/xmlLib\=/c\xmlLib=xml2' ./configure
2019-08-21 17:07:24 +00: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-fail "schedprivdir = " "schedprivdir = $out/"
2019-08-21 17:07:24 +00:00
done
2019-08-21 17:07:24 +00: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
2019-08-21 17:07:24 +00:00
patchShebangs buildutils
'';
postInstall = ''
install -Dm755 torque.setup buildutils/pbs_mkdirs -t $out/bin/
'';
meta = with 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 17:07:24 +00:00
license = "TORQUEv1.1";
};
}