about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/atlassian/bamboo.nix
blob: ee87b9e644a8cc861505f339c258484fd7816f3e (plain) (blame)
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
{ stdenvNoCC, lib, fetchurl, mysql_jdbc
, withMysql ? true
}:


stdenvNoCC.mkDerivation rec {
  pname = "atlassian-bamboo";
  version = "8.2.6";

  src = fetchurl {
    url = "https://product-downloads.atlassian.com/software/bamboo/downloads/atlassian-bamboo-${version}.tar.gz";
    sha256 = "sha256-9TYTXSdGQ7qSqvF25Bn1l5N8NbKndcO8HiJSc4NUois=";
  };

  buildPhase = ''
    echo "bamboo.home=/run/bamboo/home" > atlassian-bamboo/WEB-INF/classes/bamboo-init.properties
    mv conf/server.xml conf/server.xml.dist
    ln -sf /run/atlassian-bamboo/server.xml conf/server.xml
    rm -r logs; ln -sf /run/atlassian-bamboo/logs/ .
    rm -r temp; ln -sf /run/atlassian-bamboo/temp/ .
    rm -r work; ln -sf /run/atlassian-bamboo/work/ .
  '' + lib.optionalString withMysql ''
    cp -v ${mysql_jdbc}/share/java/*jar atlassian-bamboo/lib/
  '';

  installPhase = ''
    cp -rva . $out
    patchShebangs $out/bin
  '';

  meta = with lib; {
    description = "Bamboo Data Center is a continuous delivery server.";
    homepage = "https://www.atlassian.com/software/bamboo";
    sourceProvenance = with sourceTypes; [ binaryBytecode ];
    license = with licenses; [ unfree ];
    maintainers = with maintainers; [ techknowlogick ];
  };
}