about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/computing
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/computing')
-rw-r--r--nixpkgs/pkgs/servers/computing/slurm-spank-x11/default.nix39
-rw-r--r--nixpkgs/pkgs/servers/computing/slurm/default.nix72
-rw-r--r--nixpkgs/pkgs/servers/computing/storm/default.nix65
-rw-r--r--nixpkgs/pkgs/servers/computing/torque/default.nix54
4 files changed, 230 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/computing/slurm-spank-x11/default.nix b/nixpkgs/pkgs/servers/computing/slurm-spank-x11/default.nix
new file mode 100644
index 000000000000..13fad7059afe
--- /dev/null
+++ b/nixpkgs/pkgs/servers/computing/slurm-spank-x11/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, slurm } :
+let
+  version = "0.2.5";
+in
+stdenv.mkDerivation {
+  name = "slurm-spank-x11-${version}";
+  version = version;
+
+  src = fetchFromGitHub {
+    owner = "hautreux";
+    repo = "slurm-spank-x11";
+    rev = version;
+    sha256 = "1dmsr7whxcxwnlvl1x4s3bqr5cr6q5ssb28vqi67w5hj4sshisry";
+  };
+
+  buildPhase = ''
+      gcc -DX11_LIBEXEC_PROG="\"$out/bin/slurm-spank-x11\"" \
+          -g -o slurm-spank-x11 slurm-spank-x11.c
+      gcc -I${slurm.dev}/include -DX11_LIBEXEC_PROG="\"$out/bin/slurm-spank-x11\"" -shared -fPIC \
+          -g -o x11.so slurm-spank-x11-plug.c
+    '';
+
+  installPhase = ''
+      mkdir -p $out/bin $out/lib
+      install -m 755 slurm-spank-x11 $out/bin
+      install -m 755 x11.so $out/lib
+    '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/hautreux/slurm-spank-x11;
+    description = "Plugin for SLURM to allow for interactive X11 sessions";
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ markuskowa ];
+  };
+}
+
+
+
diff --git a/nixpkgs/pkgs/servers/computing/slurm/default.nix b/nixpkgs/pkgs/servers/computing/slurm/default.nix
new file mode 100644
index 000000000000..c30ee04623db
--- /dev/null
+++ b/nixpkgs/pkgs/servers/computing/slurm/default.nix
@@ -0,0 +1,72 @@
+{ stdenv, fetchFromGitHub, pkgconfig, libtool, curl
+, python, munge, perl, pam, openssl, zlib
+, ncurses, mysql, gtk2, lua, hwloc, numactl
+, readline, freeipmi, libssh2, xorg, lz4
+# enable internal X11 support via libssh2
+, enableX11 ? true
+}:
+
+stdenv.mkDerivation rec {
+  name = "slurm-${version}";
+  version = "18.08.4.1";
+
+  # N.B. We use github release tags instead of https://www.schedmd.com/downloads.php
+  # because the latter does not keep older releases.
+  src = fetchFromGitHub {
+    owner = "SchedMD";
+    repo = "slurm";
+    # The release tags use - instead of .
+    rev = "${builtins.replaceStrings ["."] ["-"] name}";
+    sha256 = "1vnlh1fazqa1rhiq5sm3dxgnwf4ipli357686r5w8cgij3m7qj98";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  prePatch = stdenv.lib.optional enableX11 ''
+    substituteInPlace src/common/x11_util.c \
+        --replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"'
+  '';
+
+  # nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode'
+  # https://groups.google.com/forum/#!topic/slurm-devel/QHOajQ84_Es
+  # this doesn't fix tests completely at least makes slurmd to launch
+  hardeningDisable = [ "bindnow" ];
+
+  nativeBuildInputs = [ pkgconfig libtool ];
+  buildInputs = [
+    curl python munge perl pam openssl zlib
+      mysql.connector-c ncurses gtk2 lz4
+      lua hwloc numactl readline freeipmi
+  ] ++ stdenv.lib.optionals enableX11 [ libssh2 xorg.xauth ];
+
+  configureFlags = with stdenv.lib;
+    [ "--with-freeipmi=${freeipmi}"
+      "--with-hwloc=${hwloc.dev}"
+      "--with-lz4=${lz4.dev}"
+      "--with-munge=${munge}"
+      "--with-ssl=${openssl.dev}"
+      "--with-zlib=${zlib}"
+      "--sysconfdir=/etc/slurm"
+    ] ++ (optional (gtk2 == null)  "--disable-gtktest")
+      ++ (optional enableX11 "--with-libssh2=${libssh2.dev}");
+
+
+  preConfigure = ''
+    patchShebangs ./doc/html/shtml2html.py
+    patchShebangs ./doc/man/man2html.py
+  '';
+
+  postInstall = ''
+    rm -f $out/lib/*.la $out/lib/slurm/*.la
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.schedmd.com/;
+    description = "Simple Linux Utility for Resource Management";
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ jagajaga markuskowa ];
+  };
+}
diff --git a/nixpkgs/pkgs/servers/computing/storm/default.nix b/nixpkgs/pkgs/servers/computing/storm/default.nix
new file mode 100644
index 000000000000..8335e40de98f
--- /dev/null
+++ b/nixpkgs/pkgs/servers/computing/storm/default.nix
@@ -0,0 +1,65 @@
+{ stdenv, lib, fetchurl, zip, unzip
+, jzmq, jdk, python
+, confFile ? "", extraLibraryPaths ? [], extraJars ? [] }:
+
+stdenv.mkDerivation rec {
+  name = "apache-storm-" + version;
+  version = "1.2.1";
+  src = fetchurl {
+    url =
+    "mirror://apache/storm/${name}/${name}.tar.gz";
+    sha256 = "177dqgbviagrpvalg8h67mwiwwgmiqsg0hh97hcqqcjg71ypnjkv";
+  };
+
+  buildInputs = [ zip unzip jzmq ];
+
+  installPhase = ''
+    mkdir -p $out/share/${name}
+    mv public $out/docs
+    mv examples $out/share/${name}/.
+
+    rm -f lib/jzmq* || exit 1
+    mv external extlib* lib $out/.
+    mv conf bin $out/.
+    mv log4j2 $out/conf/.
+  '';
+
+  fixupPhase = ''
+    # Fix python reference
+    sed -i \
+      -e '19iPYTHON=${python}/bin/python' \
+      -e 's|#!/usr/bin/.*python|#!${python}/bin/python|' \
+      $out/bin/storm
+    sed -i \
+      -e 's|#!/usr/bin/.*python|#!${python}/bin/python|' \
+      -e "s|STORM_CONF_DIR = .*|STORM_CONF_DIR = os.getenv('STORM_CONF_DIR','$out/conf')|" \
+      -e 's|STORM_LOG4J2_CONF_DIR =.*|STORM_LOG4J2_CONF_DIR = os.path.join(STORM_CONF_DIR, "log4j2")|' \
+        $out/bin/storm.py
+    # Default jdk location
+    sed -i -e 's|#.*export JAVA_HOME=.*|export JAVA_HOME="${jdk.home}"|' \
+           $out/conf/storm-env.sh
+    unzip  $out/lib/storm-core-${version}.jar defaults.yaml;
+    zip -d $out/lib/storm-core-${version}.jar defaults.yaml;
+    sed -i \
+       -e 's|java.library.path: .*|java.library.path: "${jzmq}/lib:${lib.concatStringsSep ":" extraLibraryPaths}"|' \
+       -e 's|storm.log4j2.conf.dir: .*|storm.log4j2.conf.dir: "conf/log4j2"|' \
+      defaults.yaml
+    ${if confFile != "" then ''cat ${confFile} >> defaults.yaml'' else ""}
+    mv defaults.yaml $out/conf;
+
+    # Link to jzmq jar and extra jars
+    cd $out/lib;
+    ln -s ${jzmq}/share/java/*.jar;
+    ${lib.concatMapStrings (jar: "ln -s ${jar};\n") extraJars}
+  '';
+
+  dontStrip = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://storm.apache.org;
+    description = "Distributed realtime computation system";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ edwtjo vizanto ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/servers/computing/torque/default.nix b/nixpkgs/pkgs/servers/computing/torque/default.nix
new file mode 100644
index 000000000000..35c830dff8a5
--- /dev/null
+++ b/nixpkgs/pkgs/servers/computing/torque/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, fetchurl, openssl, flex, bison, pkgconfig, groff, libxml2, utillinux
+, file, libtool, which }:
+
+stdenv.mkDerivation rec {
+  name = "torque-4.2.10";
+
+  src = fetchurl {
+    name = "${name}.tar.gz";
+    url = "http://www.adaptivecomputing.com/index.php?wpfb_dl=2880";
+    sha256 = "1qpsk3bla6b6m7m0i1xpr183yj79liy3p34xhnz1grgq0776wg5l";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ openssl flex bison groff libxml2 utillinux libtool
+                  which ];
+
+  enableParallelBuilding = true;
+
+  # added to fix build with gcc7
+  NIX_CFLAGS_COMPILE = [ "-fpermissive" ];
+
+  preConfigure = ''
+   substituteInPlace ./configure \
+     --replace '/usr/bin/file' '${file}/bin/file'
+
+   # 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 f in $(find ./ -name Makefile.in); do
+     echo patching $f...
+     sed -i $f -e '/PBS_MKDIRS/d' -e '/chmod u+s/d'
+   done
+
+  '';
+
+  postInstall = ''
+    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
+  '';
+
+  meta = with stdenv.lib; {
+    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;
+  };
+}