summary refs log tree commit diff
path: root/pkgs/development/tools/database/liquibase/default.nix
blob: 7d89555085d79f7df11ddfac48b8c0a6277024b1 (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
{ stdenv, fetchurl, jre, makeWrapper }:

stdenv.mkDerivation rec {
  name = "${pname}-${version}";
  pname = "liquibase";
  version = "3.4.2";

  src = fetchurl {
    url = "https://github.com/liquibase/liquibase/releases/download/${pname}-parent-${version}/${name}-bin.tar.gz";
    sha256 = "1kvxqjz8jmqpmb1clhp2asxmgfk6ynqjir8fldc321v9a5wnqby5";
  };

  buildInputs = [ jre makeWrapper ];

  unpackPhase = ''
    tar xfz ${src}
  '';

  installPhase = ''
    mkdir -p $out/{bin,lib,sdk}
    mv ./* $out/
    wrapProgram $out/liquibase --prefix PATH ":" ${jre}/bin --set LIQUIBASE_HOME $out;
    ln -s $out/liquibase $out/bin/liquibase
  '';

  meta = with stdenv.lib; {
    description = "Version Control for your database";
    homepage = "http://www.liquibase.org/";
    license = licenses.asl20;
    maintainers = with maintainers; [ nequissimus ];
  };
}