Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / atlassian / jira.nix
blob9d9c20d855e2f956c8bbcc3cac59f92aa7c3dcea
1 { stdenv
2 , lib
3 , fetchurl
4 , gawk
5 , enableSSO ? false
6 , makeWrapper
7 }:
9 stdenv.mkDerivation rec {
10   pname = "atlassian-jira";
11   version = "9.13.0";
13   src = fetchurl {
14     url = "https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-${version}.tar.gz";
15     sha256 = "sha256-WKb43gb8VUhnmm+Jvh7w/MHbyJVrYnxkpqfPk5hQk/w=";
16   };
18   nativeBuildInputs = [ makeWrapper ];
20   buildPhase = ''
21     mv conf/server.xml conf/server.xml.dist
22     ln -sf /run/atlassian-jira/server.xml conf/server.xml
23     rm -r logs; ln -sf /run/atlassian-jira/logs/ .
24     rm -r work; ln -sf /run/atlassian-jira/work/ .
25     rm -r temp; ln -sf /run/atlassian-jira/temp/ .
26     substituteInPlace bin/check-java.sh \
27       --replace "awk" "${gawk}/bin/gawk"
28   '' + lib.optionalString enableSSO ''
29     substituteInPlace atlassian-jira/WEB-INF/classes/seraph-config.xml \
30       --replace com.atlassian.jira.security.login.JiraSeraphAuthenticator \
31                 com.atlassian.jira.security.login.SSOSeraphAuthenticator
32   '';
34   installPhase = ''
35     cp -rva . $out
36   '';
38   meta = with lib; {
39     description = "Proprietary issue tracking product, also providing project management functions";
40     homepage = "https://www.atlassian.com/software/jira";
41     license = licenses.unfree;
42     maintainers = with maintainers; [ ciil megheaiulian techknowlogick ];
43   };