aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs/cassandra3/default.nix
blob: 467f665042e6703bbe56a4407ebb4c4428850241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ pkgs }:

pkgs.stdenv.mkDerivation rec {
  version = "3.11";
  name = "cassandra-${version}";

  src = pkgs.fetchgit {
    url = "https://git-wip-us.apache.org/repos/asf/cassandra.git";
    rev = "30412b08c0eb4a5cc5296725c7359f2741483ea2";
    sha256 = "0a5xgsgd5a91qckh4i40bxa6w9fw4bry0cqa3aj2hc7friwj199s";
  };

  buildInputs = with pkgs; [ ant jdk ];

  patches = [
  ];

  configurePhase = ''
    rm -rfv lib/*sigar*
    cp --symbolic-link -fv ${pkgs.hyperic-sigar}/share/java/* lib/
  '';

  buildPhase = ''
    ant jar
  '';

  installPhase = ''
    mkdir -p $out/lib/jni
    mkdir -p $out/share/java

    cp -v lib/*.jar $out/share/java/
    cp -v lib/*.zip $out/share/java/
    cp -v build/apache-cassandra*.jar $out/share/java/

    cp --symbolic-link -fv ${pkgs.hyperic-sigar}/share/java/* $out/share/java/
    cp --symbolic-link -fv ${pkgs.hyperic-sigar}/lib/jni/* $out/lib/jni/

  '';
}