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,23 +1,40 @@
{ stdenv, fetchurl, openssl, flex, bison, pkgconfig, groff, libxml2, utillinux
, file, libtool, which }:
{ stdenv, fetchFromGitHub, openssl, flex, bison, pkgconfig, groff, libxml2, utillinux
, file, libtool, which, boost, autoreconfHook
}:
stdenv.mkDerivation rec {
name = "torque-4.2.10";
pname = "torque";
version = "6.1.3h2";
src = fetchurl {
name = "${name}.tar.gz";
url = "http://www.adaptivecomputing.com/index.php?wpfb_dl=2880";
sha256 = "1qpsk3bla6b6m7m0i1xpr183yj79liy3p34xhnz1grgq0776wg5l";
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";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl flex bison groff libxml2 utillinux libtool
which ];
strictDeps = true;
nativeBuildInputs = [ autoreconfHook pkgconfig flex bison libxml2 ];
buildInputs = [
openssl groff libxml2 utillinux libtool
which boost
];
enableParallelBuilding = true;
# 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 = ''
substituteInPlace ./configure \
@ -36,11 +53,12 @@ stdenv.mkDerivation rec {
sed -i $f -e '/PBS_MKDIRS/d' -e '/chmod u+s/d'
done
patchShebangs buildutils
'';
postInstall = ''
mv $out/sbin/* $out/bin/
rmdir $out/sbin
#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
@ -50,5 +68,6 @@ stdenv.mkDerivation rec {
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;
license = "TORQUEv1.1";
};
}