1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 libedit,
6 autoreconfHook271,
7 zlib,
8 unzip,
9 libtommath,
10 libtomcrypt,
11 icu73,
12 superServer ? false,
13}:
14
15let
16 base = {
17 pname = "firebird";
18
19 meta = with lib; {
20 description = "SQL relational database management system";
21 downloadPage = "https://github.com/FirebirdSQL/firebird/";
22 homepage = "https://firebirdsql.org/";
23 changelog = "https://github.com/FirebirdSQL/firebird/blob/master/CHANGELOG.md";
24 license = [
25 "IDPL"
26 "Interbase-1.0"
27 ];
28 platforms = platforms.linux;
29 maintainers = with maintainers; [
30 bbenno
31 marcweber
32 ];
33 };
34
35 nativeBuildInputs = [ autoreconfHook271 ];
36
37 buildInputs = [
38 libedit
39 icu73
40 ];
41
42 LD_LIBRARY_PATH = lib.makeLibraryPath [ icu73 ];
43
44 configureFlags = [
45 "--with-system-editline"
46 ]
47 ++ (lib.optional superServer "--enable-superserver");
48
49 enableParallelBuilding = true;
50
51 installPhase = ''
52 runHook preInstall
53 mkdir -p $out
54 cp -r gen/Release/firebird/* $out
55 rm $out/lib/*.a # they were just symlinks to /build/source/...
56 runHook postInstall
57 '';
58
59 };
60in
61rec {
62 firebird_3 = stdenv.mkDerivation (
63 base
64 // rec {
65 version = "3.0.12";
66
67 src = fetchFromGitHub {
68 owner = "FirebirdSQL";
69 repo = "firebird";
70 rev = "v${version}";
71 hash = "sha256-po8tMrOahfwayVXa7Eadr9+ZEmZizHlCmxi094cOJSY=";
72 };
73
74 buildInputs = base.buildInputs ++ [
75 zlib
76 libtommath
77 ];
78
79 meta = base.meta // {
80 platforms = [ "x86_64-linux" ];
81 };
82 }
83 );
84
85 firebird_4 = stdenv.mkDerivation (
86 base
87 // rec {
88 version = "4.0.5";
89
90 src = fetchFromGitHub {
91 owner = "FirebirdSQL";
92 repo = "firebird";
93 rev = "v${version}";
94 hash = "sha256-OxkPpmnYTl65ns+hKHJd5IAPUiMj0g3HUpyRpwDNut8=";
95 };
96
97 nativeBuildInputs = base.nativeBuildInputs ++ [ unzip ];
98 buildInputs = base.buildInputs ++ [
99 zlib
100 libtommath
101 libtomcrypt
102 ];
103 }
104 );
105
106 firebird = firebird_4;
107}