From aef5ee69641efa5eefe7255049c7caf71602f094 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Mon, 22 Jun 2020 15:36:39 +0200 Subject: [PATCH] apache-storm: 1.2.1 -> 2.1.0 --- pkgs/servers/computing/storm/default.nix | 32 +++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/pkgs/servers/computing/storm/default.nix b/pkgs/servers/computing/storm/default.nix index d55dd14601e8..b8ae0bc4e852 100644 --- a/pkgs/servers/computing/storm/default.nix +++ b/pkgs/servers/computing/storm/default.nix @@ -1,24 +1,27 @@ { stdenv, lib, fetchurl, zip, unzip -, jzmq, jdk, python -, confFile ? "", extraLibraryPaths ? [], extraJars ? [] }: +, jdk, python +, confFile ? "" +, extraLibraryPaths ? [] +, extraJars ? [] +}: stdenv.mkDerivation rec { - name = "apache-storm-" + version; - version = "1.2.1"; + pname = "apache-storm"; + version = "2.1.0"; + name = "${pname}-${version}"; + src = fetchurl { - url = - "mirror://apache/storm/${name}/${name}.tar.gz"; - sha256 = "177dqgbviagrpvalg8h67mwiwwgmiqsg0hh97hcqqcjg71ypnjkv"; + url = "mirror://apache/storm/${name}/${name}.tar.gz"; + sha256 = "1i3z08rfy7aavshrbrskv9dmlhx1fjgrhhqm0pczfam4vnas8yg2"; }; - buildInputs = [ zip unzip jzmq ]; + buildInputs = [ zip unzip ]; 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/. @@ -35,21 +38,22 @@ stdenv.mkDerivation rec { -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; + ls -lh $out/lib + unzip $out/lib/storm-client-${version}.jar defaults.yaml; + zip -d $out/lib/storm-client-${version}.jar defaults.yaml; sed -i \ - -e 's|java.library.path: .*|java.library.path: "${jzmq}/lib:${lib.concatStringsSep ":" extraLibraryPaths}"|' \ + -e 's|java.library.path: .*|java.library.path: "${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 + # Link to extra jars cd $out/lib; - ln -s ${jzmq}/share/java/*.jar; ${lib.concatMapStrings (jar: "ln -s ${jar};\n") extraJars} '';