1 { stdenv, lib, fetchurl, zip, unzip
4 , extraLibraryPaths ? []
8 stdenv.mkDerivation rec {
9 pname = "apache-storm";
11 name = "${pname}-${version}";
14 url = "mirror://apache/storm/${name}/${name}.tar.gz";
15 sha256 = "sha256-VFNcaISPBRMGR5l/P6/pGnK7lHClDW2AmXJ00gzxwMY=";
18 nativeBuildInputs = [ zip unzip ];
21 mkdir -p $out/share/${name}
23 mv examples $out/share/${name}/.
25 mv external extlib* lib $out/.
31 # Fix python reference
33 -e '19iPYTHON=${python2}/bin/python' \
34 -e 's|#!/usr/bin/.*python|#!${python2}/bin/python|' \
37 -e 's|#!/usr/bin/.*python|#!${python2}/bin/python|' \
38 -e "s|STORM_CONF_DIR = .*|STORM_CONF_DIR = os.getenv('STORM_CONF_DIR','$out/conf')|" \
39 -e 's|STORM_LOG4J2_CONF_DIR =.*|STORM_LOG4J2_CONF_DIR = os.path.join(STORM_CONF_DIR, "log4j2")|' \
42 # Default jdk location
43 sed -i -e 's|#.*export JAVA_HOME=.*|export JAVA_HOME="${jdk.home}"|' \
44 $out/conf/storm-env.sh
46 unzip $out/lib/storm-client-${version}.jar defaults.yaml;
47 zip -d $out/lib/storm-client-${version}.jar defaults.yaml;
49 -e 's|java.library.path: .*|java.library.path: "${lib.concatStringsSep ":" extraLibraryPaths}"|' \
50 -e 's|storm.log4j2.conf.dir: .*|storm.log4j2.conf.dir: "conf/log4j2"|' \
52 ${lib.optionalString (confFile != "") "cat ${confFile} >> defaults.yaml"}
53 mv defaults.yaml $out/conf;
57 ${lib.concatMapStrings (jar: "ln -s ${jar};\n") extraJars}
63 homepage = "https://storm.apache.org/";
64 description = "Distributed realtime computation system";
65 sourceProvenance = with sourceTypes; [ binaryBytecode ];
66 license = licenses.asl20;
67 maintainers = with maintainers; [ edwtjo vizanto ];
68 platforms = with platforms; unix;