summaryrefslogtreecommitdiff
path: root/pkgs/keycloak/default.nix
blob: e90e0d2ce62a300f029793abc63186128d0fce30 (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
{ stdenv, fetchurl, jdk, makeWrapper }:

stdenv.mkDerivation rec {
  name = "keycloak-${version}";
  version = "4.0.0.Beta1";
  src = fetchurl {
    url = "https://downloads.jboss.org/keycloak/${version}/keycloak-${version}.tar.gz";
    sha512 = "2j6bqwmx7gqf989r56qm7fvrzqhcc5gbsmwj8mxid5kmd8mcl8bs12hj3ryiih56mh86jhz674ss677l59f5271p0yi5wzigcyamwj5";
  };

  buildInputs = [ makeWrapper ];

  installPhase = ''
    mkdir -p $out
    mv * $out/
  '';

  postFixup = ''
    for b in "$out"/bin/*.sh; do
      echo patching $b
      wrapProgram "$b" --prefix PATH : "${jdk}/bin"
    done
  '';
}