Merge PR #901: adding Storm

vcunat edit: use symlink instead of hardlink (failed for me with a
cross-device error), minor whitespace cleanup
This commit is contained in:
Vladimír Čunát 2013-09-10 16:05:47 +02:00
commit bb6b42385d
4 changed files with 81 additions and 0 deletions

View File

@ -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";
};
}

View File

@ -55,6 +55,7 @@
urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>";
vcunat = "Vladimír Čunát <vcunat@gmail.com>";
viric = "Lluís Batlle i Rossell <viric@viric.name>";
vizanto = "Danny Wilson <danny@prime.vc>";
winden = "Antonio Vargas Gonzalez <windenntw@gmail.com>";
z77z = "Marco Maggesi <maggesi@math.unifi.it>";
}

View File

@ -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 ];
};
}

View File

@ -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 { };