summary refs log tree commit diff
path: root/pkgs/servers/computing/torque
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2019-08-21 19:07:24 +0200
committerRobin Gloster <mail@glob.in>2019-08-21 19:07:24 +0200
commit5d3e36cabacec4209b6c18b8191ffb57595c8cc9 (patch)
tree519fd0da001e2f7e47ac8194c4ae192809f10a31 /pkgs/servers/computing/torque
parentbabb9f0cc101d8451ea3f76f1a138cee51d4f710 (diff)
downloadnixpkgs-5d3e36cabacec4209b6c18b8191ffb57595c8cc9.tar
nixpkgs-5d3e36cabacec4209b6c18b8191ffb57595c8cc9.tar.gz
nixpkgs-5d3e36cabacec4209b6c18b8191ffb57595c8cc9.tar.bz2
nixpkgs-5d3e36cabacec4209b6c18b8191ffb57595c8cc9.tar.lz
nixpkgs-5d3e36cabacec4209b6c18b8191ffb57595c8cc9.tar.xz
nixpkgs-5d3e36cabacec4209b6c18b8191ffb57595c8cc9.tar.zst
nixpkgs-5d3e36cabacec4209b6c18b8191ffb57595c8cc9.zip
torque: 4.2.10 -> 6.1.3h2
Diffstat (limited to 'pkgs/servers/computing/torque')
-rw-r--r--pkgs/servers/computing/torque/default.nix69
1 files changed, 44 insertions, 25 deletions
diff --git a/pkgs/servers/computing/torque/default.nix b/pkgs/servers/computing/torque/default.nix
index 35c830dff8a..79be0b93c70 100644
--- a/pkgs/servers/computing/torque/default.nix
+++ b/pkgs/servers/computing/torque/default.nix
@@ -1,46 +1,64 @@
-{ 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 \
-     --replace '/usr/bin/file' '${file}/bin/file'
+    substituteInPlace ./configure \
+      --replace '/usr/bin/file' '${file}/bin/file'
 
-   # fix broken libxml2 detection
-   sed -i '/xmlLib\=/c\xmlLib=xml2' ./configure
+    # fix broken libxml2 detection
+    sed -i '/xmlLib\=/c\xmlLib=xml2' ./configure
 
-   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 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...
-     sed -i $f -e '/PBS_MKDIRS/d' -e '/chmod u+s/d'
-   done
+    for f in $(find ./ -name Makefile.in); do
+      echo patching $f...
+      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";
   };
 }