about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/atlassian/bamboo.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/atlassian/bamboo.nix')
-rw-r--r--nixpkgs/pkgs/servers/atlassian/bamboo.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/atlassian/bamboo.nix b/nixpkgs/pkgs/servers/atlassian/bamboo.nix
new file mode 100644
index 000000000000..a60d41d41c1f
--- /dev/null
+++ b/nixpkgs/pkgs/servers/atlassian/bamboo.nix
@@ -0,0 +1,37 @@
+{ stdenvNoCC, lib, fetchurl, mysql_jdbc
+, withMysql ? true
+}:
+
+
+stdenvNoCC.mkDerivation rec {
+  pname = "atlassian-bamboo";
+  version = "8.1.3";
+
+  src = fetchurl {
+    url = "https://product-downloads.atlassian.com/software/bamboo/downloads/atlassian-bamboo-${version}.tar.gz";
+    sha256 = "sha256-M406audmwCS4SRPj8oYxZ+tBpt9bGoOsA3+9WwdZ1fw=";
+  };
+
+  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";
+    license = with licenses; [ unfree ];
+    maintainers = with maintainers; [ techknowlogick ];
+  };
+}