about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/firebird/default.nix
blob: 6f5d22462fb6b8808efd0032f56a2ada6997d541 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{ lib, stdenv, fetchFromGitHub, libedit, autoreconfHook, zlib, unzip, libtommath, libtomcrypt, icu, superServer ? false }:

let base = {
  pname = "firebird";

  meta = with lib; {
    description = "SQL relational database management system";
    downloadPage = "https://github.com/FirebirdSQL/firebird/";
    homepage = "https://firebirdsql.org/";
    changelog = "https://github.com/FirebirdSQL/firebird/blob/master/CHANGELOG.md";
    license = [ "IDPL" "Interbase-1.0" ];
    platforms = platforms.linux;
    maintainers = with maintainers; [ marcweber ];
  };

  nativeBuildInputs = [ autoreconfHook ];

  buildInputs = [ libedit icu ];

  LD_LIBRARY_PATH = lib.makeLibraryPath [ icu ];

  configureFlags = [
    "--with-system-editline"
  ] ++ (lib.optional superServer "--enable-superserver");

  installPhase = ''
    runHook preInstall
    mkdir -p $out
    cp -r gen/Release/firebird/* $out
    runHook postInstall
  '';

}; in rec {

  firebird_2_5 = stdenv.mkDerivation (base // rec {
    version = "2.5.9";

    src = fetchFromGitHub {
      owner = "FirebirdSQL";
      repo = "firebird";
      rev = "R${builtins.replaceStrings [ "." ] [ "_" ] version}";
      sha256 = "sha256-YyvlMeBux80OpVhsCv+6IVxKXFRsgdr+1siupMR13JM=";
    };

    configureFlags = base.configureFlags ++ [ "--with-system-icu" ];

    installPhase = ''
      runHook preInstall
      mkdir -p $out
      cp -r gen/firebird/* $out
      runHook postInstall
    '';

    meta = base.meta // { platforms = [ "x86_64-linux" ]; };
  });

  firebird_3 = stdenv.mkDerivation (base // rec {
    version = "3.0.9";

    src = fetchFromGitHub {
      owner = "FirebirdSQL";
      repo = "firebird";
      rev = "v${version}";
      sha256 = "0axgw4zzb7f7yszr8s7svnspv3mgyvpbkb0b3w6c70fnj10hw21c";
    };

    buildInputs = base.buildInputs ++ [ zlib libtommath ];

    meta = base.meta // { platforms = [ "x86_64-linux" ]; };
  });

  firebird_4 = stdenv.mkDerivation (base // rec {
    version = "4.0.1";

    src = fetchFromGitHub {
      owner = "FirebirdSQL";
      repo = "firebird";
      rev = "v${version}";
      sha256 = "sha256-0XUu1g/VTrklA3vCpX6HWr7sdW2eQupnelpFNSGcouM=";
    };

    buildInputs = base.buildInputs ++ [ zlib unzip libtommath libtomcrypt ];
  });

  firebird = firebird_4;
}