diff --git a/pkgs/development/libraries/java/jzmq/default.nix b/pkgs/development/libraries/java/jzmq/default.nix new file mode 100644 index 000000000000..508b188aef72 --- /dev/null +++ b/pkgs/development/libraries/java/jzmq/default.nix @@ -0,0 +1,27 @@ +{stdenv, fetchgit, automake, autoconf, libtool, pkgconfig, zeromq2, jdk}: + +stdenv.mkDerivation rec { + name = "jzmq-2.1.0"; + + src = fetchgit { + url = git://github.com/zeromq/jzmq.git; + rev = "946fd39780423b2df6e5efd9fa2cd863fd79c9db"; + }; + + buildInputs = [ automake autoconf libtool pkgconfig zeromq2 jdk ]; + + preConfigurePhases = ["./autogen.sh"]; + preConfigure = '' + sed -i -e 's|(JAVAC)|(JAVAC) -encoding utf8|' src/Makefile.in + ${if stdenv.system == "x86_64-darwin" then + '' sed -i -e 's~/Headers~/include~' -e 's~_JNI_INC_SUBDIRS=\".*\"~_JNI_INC_SUBDIRS=\"darwin\"~' configure + '' else ""} + ''; + + + maintainers = [ stdenv.lib.maintainers.vizanto ]; + meta = { + homepage = "http://www.zeromq.org"; + description = "Java bindings for ZeroMQ"; + }; +} diff --git a/pkgs/lib/maintainers.nix b/pkgs/lib/maintainers.nix index 52487b72490c..cd4242b170fd 100644 --- a/pkgs/lib/maintainers.nix +++ b/pkgs/lib/maintainers.nix @@ -55,6 +55,7 @@ urkud = "Yury G. Kudryashov "; vcunat = "Vladimír Čunát "; viric = "Lluís Batlle i Rossell "; + vizanto = "Danny Wilson "; winden = "Antonio Vargas Gonzalez "; z77z = "Marco Maggesi "; } diff --git a/pkgs/servers/computing/storm/default.nix b/pkgs/servers/computing/storm/default.nix new file mode 100644 index 000000000000..ca3f5333b30e --- /dev/null +++ b/pkgs/servers/computing/storm/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl, zip, unzip, jzmq, jdk, lib, python, logsDir ? "", confFile ? "", extraLibraryPaths ? [], extraJars ? [] }: + +stdenv.mkDerivation { + name = "storm-0.8.2"; + src = fetchurl { + url = https://dl.dropbox.com/u/133901206/storm-0.8.2.zip; + sha256 = "8761aea0b54e5bab4a68b259bbe6b5b2f8226204488b5559eba57a0c458b2bbc"; + }; + + buildInputs = [ zip unzip jzmq ]; + + installPhase = '' + # Remove junk + rm -f lib/jzmq* + mkdir -p $out/bin + mv bin/storm $out/bin/ + rm -R bin conf logs + + # Fix shebang header for python scripts + sed -i -e "s|#!/usr/bin/.*python|#!${python}/bin/python|" $out/bin/storm; + + mkdir -p $out/conf + cp -av * $out + + cd $out; + ${if logsDir != "" then ''ln -s ${logsDir} logs'' else ""} + + # Extract, delete from zip; and optionally append to defaults.yaml + unzip storm-*.jar defaults.yaml; + zip -d storm-*.jar defaults.yaml; + echo 'java.library.path: "${jzmq}/lib:${lib.concatStringsSep ":" extraLibraryPaths}"' >> defaults.yaml; + ${if confFile != "" then ''cat ${confFile} >> defaults.yaml'' else ""} + mv defaults.yaml conf; + + # Link to jzmq jar and extra jars + cd lib; + ln -s ${jzmq}/share/java/*.jar; + ${lib.concatMapStrings (jar: "ln -s ${jar};\n") extraJars} + ''; + + dontStrip = true; + + meta = { + homepage = "http://storm-project.net"; + description = "Storm, free and open source distributed realtime computation system."; + license = "Eclipse Public License 1.0"; + maintainers = [ lib.maintainers.vizanto ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4f36ba63f074..cc942c36b066 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5757,6 +5757,8 @@ let junit = callPackage ../development/libraries/java/junit { }; + jzmq = callPackage ../development/libraries/java/jzmq { }; + lucene = callPackage ../development/libraries/java/lucene { }; mockobjects = callPackage ../development/libraries/java/mockobjects { }; @@ -6189,6 +6191,8 @@ let thttpd = callPackage ../servers/http/thttpd { }; + storm = callPackage ../servers/computing/storm { }; + tomcat5 = callPackage ../servers/http/tomcat/5.0.nix { }; tomcat6 = callPackage ../servers/http/tomcat/6.0.nix { };