Files
nixpkgs/pkgs/servers/firebird/default.nix
2026-04-26 12:42:24 +02:00

150 lines
3.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchDebianPatch,
libedit,
autoreconfHook,
cmake,
zlib,
unzip,
libtommath,
libtomcrypt,
icu73,
superServer ? false,
}:
let
base = {
pname = "firebird";
meta = {
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 = with lib.licenses; [
mpl11
interbase
];
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
bbenno
];
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
libedit
icu73
];
env.LD_LIBRARY_PATH = lib.makeLibraryPath [ icu73 ];
configureFlags = [
"--with-system-editline"
]
++ (lib.optional superServer "--enable-superserver");
enableParallelBuilding = true;
__structuredAttrs = true;
strictDeps = true;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r gen/Release/firebird/* $out
rm -f $out/lib/*.a # they were just symlinks to /build/source/...
runHook postInstall
'';
};
in
rec {
firebird_3 = stdenv.mkDerivation (
base
// rec {
version = "3.0.14";
src = fetchFromGitHub {
owner = "FirebirdSQL";
repo = "firebird";
rev = "v${version}";
hash = "sha256-X6Jv32VniAefIWjLTPwEipsQVRl7HBb4EKyi2IL1VWM=";
};
patches = [
(fetchDebianPatch {
pname = "firebird3.0";
version = "3.0.13.ds7";
debianRevision = "2";
patch = "no-binary-gbaks.patch";
hash = "sha256-LXUMM38PBYeLPdgaxLPau4HWB4ItJBBnx7oGwalL6Pg=";
})
];
buildInputs = base.buildInputs ++ [
zlib
libtommath
];
meta = base.meta // {
platforms = [ "x86_64-linux" ];
};
}
);
firebird_4 = stdenv.mkDerivation (
base
// rec {
version = "4.0.7";
src = fetchFromGitHub {
owner = "FirebirdSQL";
repo = "firebird";
rev = "v${version}";
hash = "sha256-4u1Vgwk5cMCkrGfGSk2xO7hVHiDda0ioitvX/r3KPQc=";
};
nativeBuildInputs = base.nativeBuildInputs ++ [ unzip ];
buildInputs = base.buildInputs ++ [
zlib
libtommath
libtomcrypt
];
}
);
firebird_5 = stdenv.mkDerivation (
base
// rec {
version = "5.0.4";
src = fetchFromGitHub {
owner = "FirebirdSQL";
repo = "firebird";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-IJrfs8q7GtX4Y+Cmg4avT5QJmLpld38tyR3TR1CcgyE=";
};
# CMake is just used for libcds
dontUseCmakeConfigure = true;
nativeBuildInputs = base.nativeBuildInputs ++ [
cmake
unzip
];
buildInputs = base.buildInputs ++ [
zlib
libtommath
libtomcrypt
];
}
);
firebird = firebird_5;
}