nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 19.03 54 lines 1.6 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 # added to fix build with gcc7 20 NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; 21 22 preConfigure = '' 23 substituteInPlace ./configure \ 24 --replace '/usr/bin/file' '${file}/bin/file' 25 26 # fix broken libxml2 detection 27 sed -i '/xmlLib\=/c\xmlLib=xml2' ./configure 28 29 for s in fifo cray_t3e dec_cluster msic_cluster sgi_origin umn_cluster; do 30 substituteInPlace src/scheduler.cc/samples/$s/Makefile.in \ 31 --replace "schedprivdir = " "schedprivdir = $out/" 32 done 33 34 for f in $(find ./ -name Makefile.in); do 35 echo patching $f... 36 sed -i $f -e '/PBS_MKDIRS/d' -e '/chmod u+s/d' 37 done 38 39 ''; 40 41 postInstall = '' 42 mv $out/sbin/* $out/bin/ 43 rmdir $out/sbin 44 cp -v buildutils/pbs_mkdirs $out/bin/ 45 cp -v torque.setup $out/bin/ 46 chmod +x $out/bin/pbs_mkdirs $out/bin/torque.setup 47 ''; 48 49 meta = with stdenv.lib; { 50 homepage = http://www.adaptivecomputing.com/products/open-source/torque; 51 description = "Resource management system for submitting and controlling jobs on supercomputers, clusters, and grids"; 52 platforms = platforms.linux; 53 }; 54}