torque: 4.2.10 -> 6.1.3h2

This commit is contained in:
Robin Gloster 2019-08-21 19:07:24 +02:00
parent babb9f0cc1
commit 5d3e36caba
No known key found for this signature in database
GPG Key ID: D5C458DF6DD97EDF

View File

@ -1,46 +1,64 @@
{ stdenv, fetchurl, openssl, flex, bison, pkgconfig, groff, libxml2, utillinux { stdenv, fetchFromGitHub, openssl, flex, bison, pkgconfig, groff, libxml2, utillinux
, file, libtool, which }: , file, libtool, which, boost, autoreconfHook
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "torque-4.2.10"; pname = "torque";
version = "6.1.3h2";
src = fetchurl { src = fetchFromGitHub {
name = "${name}.tar.gz"; owner = "adaptivecomputing";
url = "http://www.adaptivecomputing.com/index.php?wpfb_dl=2880"; repo = pname;
sha256 = "1qpsk3bla6b6m7m0i1xpr183yj79liy3p34xhnz1grgq0776wg5l"; # branch 6.1.3h2, as they aren't pushing tags
# https://github.com/adaptivecomputing/torque/issues/467
rev = "458883319157cfc5c509046d09f9eb8e68e8d398";
sha256 = "1b56bc5j9wg87kcywzmhf7234byyrwax9v1pqsr9xmv2x7saakrr";
}; };
nativeBuildInputs = [ pkgconfig ]; strictDeps = true;
buildInputs = [ openssl flex bison groff libxml2 utillinux libtool nativeBuildInputs = [ autoreconfHook pkgconfig flex bison libxml2 ];
which ]; buildInputs = [
openssl groff libxml2 utillinux libtool
which boost
];
enableParallelBuilding = true; enableParallelBuilding = true;
# added to fix build with gcc7 # added to fix build with gcc7
NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; 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/"
'';
preConfigure = '' preConfigure = ''
substituteInPlace ./configure \ substituteInPlace ./configure \
--replace '/usr/bin/file' '${file}/bin/file' --replace '/usr/bin/file' '${file}/bin/file'
# fix broken libxml2 detection # fix broken libxml2 detection
sed -i '/xmlLib\=/c\xmlLib=xml2' ./configure sed -i '/xmlLib\=/c\xmlLib=xml2' ./configure
for s in fifo cray_t3e dec_cluster msic_cluster sgi_origin umn_cluster; do for s in fifo cray_t3e dec_cluster msic_cluster sgi_origin umn_cluster; do
substituteInPlace src/scheduler.cc/samples/$s/Makefile.in \ substituteInPlace src/scheduler.cc/samples/$s/Makefile.in \
--replace "schedprivdir = " "schedprivdir = $out/" --replace "schedprivdir = " "schedprivdir = $out/"
done done
for f in $(find ./ -name Makefile.in); do for f in $(find ./ -name Makefile.in); do
echo patching $f... echo patching $f...
sed -i $f -e '/PBS_MKDIRS/d' -e '/chmod u+s/d' sed -i $f -e '/PBS_MKDIRS/d' -e '/chmod u+s/d'
done done
patchShebangs buildutils
''; '';
postInstall = '' postInstall = ''
mv $out/sbin/* $out/bin/ #mv $out/sbin/* $out/bin/
rmdir $out/sbin #rmdir $out/sbin
cp -v buildutils/pbs_mkdirs $out/bin/ cp -v buildutils/pbs_mkdirs $out/bin/
cp -v torque.setup $out/bin/ cp -v torque.setup $out/bin/
chmod +x $out/bin/pbs_mkdirs $out/bin/torque.setup chmod +x $out/bin/pbs_mkdirs $out/bin/torque.setup
@ -50,5 +68,6 @@ stdenv.mkDerivation rec {
homepage = http://www.adaptivecomputing.com/products/open-source/torque; homepage = http://www.adaptivecomputing.com/products/open-source/torque;
description = "Resource management system for submitting and controlling jobs on supercomputers, clusters, and grids"; description = "Resource management system for submitting and controlling jobs on supercomputers, clusters, and grids";
platforms = platforms.linux; platforms = platforms.linux;
license = "TORQUEv1.1";
}; };
} }