1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 14:41:17 +00:00

Merge pull request #22505 from tweag/fd/spark-2.1.0

spark: 1.6.0 -> 2.1.0
This commit is contained in:
Joachim F 2017-02-11 20:31:59 +01:00 committed by GitHub
commit 0b59657e2c
2 changed files with 24 additions and 6 deletions

View file

@ -1,22 +1,38 @@
{ stdenv, fetchzip, makeWrapper, jre, pythonPackages
, mesosSupport ? true, mesos
, version
}:
let
versionMap = {
"1.6.0" = {
hadoopVersion = "cdh4";
sparkSha256 = "19ycx1r8g82vkvzmn9wxkssmv2damrg72yfmrgzpc6xyh071g91c";
};
"2.1.0" = {
hadoopVersion = "hadoop2.4";
sparkSha256 = "0pbsmbjwijsfgbnm56kgwnmnlqkz3w010ma0d7vzlkdklj40vqn2";
};
};
in
with versionMap.${version};
with stdenv.lib;
stdenv.mkDerivation rec {
name = "spark-${version}";
version = "1.6.0";
name = "spark-${version}";
src = fetchzip {
url = "mirror://apache/spark/${name}/${name}-bin-cdh4.tgz";
sha256 = "19ycx1r8g82vkvzmn9wxkssmv2damrg72yfmrgzpc6xyh071g91c";
url = "mirror://apache/spark/${name}/${name}-bin-${hadoopVersion}.tgz";
sha256 = sparkSha256;
};
buildInputs = [ makeWrapper jre pythonPackages.python pythonPackages.numpy ]
++ optional mesosSupport mesos;
untarDir = "${name}-bin-cdh4";
untarDir = "${name}-bin-${hadoopVersion}";
installPhase = ''
mkdir -p $out/{lib/${untarDir}/conf,bin,/share/java}
mv * $out/lib/${untarDir}

View file

@ -5947,7 +5947,9 @@ with pkgs;
self = callPackage_i686 ../development/interpreters/self { };
spark = callPackage ../applications/networking/cluster/spark { };
spark = spark_21;
spark_16 = callPackage ../applications/networking/cluster/spark { version = "1.6.0"; };
spark_21 = callPackage ../applications/networking/cluster/spark { version = "2.1.0"; };
spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { };
spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.nix { };