at 18.03-beta 51 lines 1.5 kB view raw
1{ stdenv, fetchurl, openssl, flex, bison, pkgconfig, groff, libxml2, utillinux 2, file, libtool, which }: 3 4stdenv.mkDerivation rec { 5 name = "torque-4.2.10"; 6 7 src = fetchurl { 8 name = "${name}.tar.gz"; 9 url = "http://www.adaptivecomputing.com/index.php?wpfb_dl=2880"; 10 sha256 = "1qpsk3bla6b6m7m0i1xpr183yj79liy3p34xhnz1grgq0776wg5l"; 11 }; 12 13 nativeBuildInputs = [ pkgconfig ]; 14 buildInputs = [ openssl flex bison groff libxml2 utillinux libtool 15 which ]; 16 17 enableParallelBuilding = true; 18 19 preConfigure = '' 20 substituteInPlace ./configure \ 21 --replace '/usr/bin/file' '${file}/bin/file' 22 23 # fix broken libxml2 detection 24 sed -i '/xmlLib\=/c\xmlLib=xml2' ./configure 25 26 for s in fifo cray_t3e dec_cluster msic_cluster sgi_origin umn_cluster; do 27 substituteInPlace src/scheduler.cc/samples/$s/Makefile.in \ 28 --replace "schedprivdir = " "schedprivdir = $out/" 29 done 30 31 for f in $(find ./ -name Makefile.in); do 32 echo patching $f... 33 sed -i $f -e '/PBS_MKDIRS/d' -e '/chmod u+s/d' 34 done 35 36 ''; 37 38 postInstall = '' 39 mv $out/sbin/* $out/bin/ 40 rmdir $out/sbin 41 cp -v buildutils/pbs_mkdirs $out/bin/ 42 cp -v torque.setup $out/bin/ 43 chmod +x $out/bin/pbs_mkdirs $out/bin/torque.setup 44 ''; 45 46 meta = with stdenv.lib; { 47 homepage = http://www.adaptivecomputing.com/products/open-source/torque; 48 description = "Resource management system for submitting and controlling jobs on supercomputers, clusters, and grids"; 49 platforms = platforms.linux; 50 }; 51}