2018-07-21 02:44:44 +02:00
|
|
|
{stdenv, fetchurl, libedit, automake, autoconf, libtool
|
2016-09-27 04:26:33 +02:00
|
|
|
,
|
2013-07-30 16:33:46 +02:00
|
|
|
# icu = null: use icu which comes with firebird
|
|
|
|
|
|
|
|
# icu = pkgs.icu => you may have trouble sharing database files with windows
|
|
|
|
# users if "Collation unicode" columns are being used
|
|
|
|
# windows icu version is *30.dll, however neither the icu 3.0 nor the 3.6
|
|
|
|
# sources look close to what ships with this package.
|
|
|
|
# Thus I think its best to trust firebird devs and use their version
|
|
|
|
|
|
|
|
# icu version missmatch may cause such error when selecting from a table:
|
|
|
|
# "Collation unicode for character set utf8 is not installed"
|
|
|
|
|
2016-04-06 18:16:23 +02:00
|
|
|
# icu 3.0 can still be built easily by nix (by dropping the #elif case and
|
2013-07-30 16:33:46 +02:00
|
|
|
# make | make)
|
|
|
|
icu ? null
|
|
|
|
|
2010-06-03 17:19:56 +02:00
|
|
|
, superServer ? false
|
|
|
|
, port ? 3050
|
|
|
|
, serviceName ? "gds_db"
|
|
|
|
}:
|
|
|
|
|
|
|
|
/*
|
|
|
|
there are 3 ways to use firebird:
|
2013-07-30 16:33:46 +02:00
|
|
|
a) superserver
|
2010-06-03 17:19:56 +02:00
|
|
|
- one process, one thread for each connection
|
2013-07-30 16:33:46 +02:00
|
|
|
b) classic
|
2010-06-03 17:19:56 +02:00
|
|
|
- is built by default
|
|
|
|
- one process for each connection
|
|
|
|
- on linux direct io operations (?)
|
|
|
|
c) embedded.
|
|
|
|
|
|
|
|
manual says that you usually don't notice the difference between a and b.
|
|
|
|
|
|
|
|
I'm only interested in the embedder shared libary for now.
|
|
|
|
So everything isn't tested yet
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2013-02-23 17:22:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-02-23 02:52:15 +01:00
|
|
|
version = "2.5.7.27050-0";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "firebird";
|
2010-06-03 17:19:56 +02:00
|
|
|
|
2013-07-30 16:33:46 +02:00
|
|
|
# enableParallelBuilding = false; build fails
|
|
|
|
|
|
|
|
# http://tracker.firebirdsql.org/browse/CORE-3246
|
|
|
|
preConfigure = ''
|
|
|
|
makeFlags="$makeFlags CPU=$NIX_BUILD_CORES"
|
|
|
|
'';
|
|
|
|
|
2010-06-03 17:19:56 +02:00
|
|
|
configureFlags =
|
|
|
|
[ "--with-serivec-port=${builtins.toString port}"
|
|
|
|
"--with-service-name=${serviceName}"
|
2013-07-30 16:33:46 +02:00
|
|
|
"--with-system-editline"
|
|
|
|
"--with-fblog=/var/log/firebird"
|
|
|
|
"--with-fbconf=/etc/firebird"
|
|
|
|
"--with-fbsecure-db=/var/db/firebird/system"
|
2010-06-03 17:19:56 +02:00
|
|
|
]
|
2013-07-30 16:33:46 +02:00
|
|
|
++ (stdenv.lib.optional (icu != null) "--with-system-icu")
|
|
|
|
++ (stdenv.lib.optional superServer "--enable-superserver");
|
2010-06-03 17:19:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-07-13 21:59:03 +02:00
|
|
|
url = "mirror://sourceforge/firebird/Firebird-${version}.tar.bz2";
|
2017-02-23 02:52:15 +01:00
|
|
|
sha256 = "06hp6bq5irqvm3h03s79qjgcc3jsjpq150y9aq7anklx9v4nhfqa";
|
2010-06-03 17:19:56 +02:00
|
|
|
};
|
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-09 03:21:31 +01:00
|
|
|
|
2013-07-30 16:33:46 +02:00
|
|
|
# configurePhase = ''
|
|
|
|
# sed -i 's@cp /usr/share/automake-.*@@' autogen.sh
|
|
|
|
# sh autogen.sh $configureFlags --prefix=$out
|
|
|
|
# '';
|
|
|
|
buildInputs = [libedit icu automake autoconf libtool];
|
2010-06-03 17:19:56 +02:00
|
|
|
|
|
|
|
# TODO: Probably this hase to be tidied up..
|
|
|
|
# make install requires beeing. disabling the root checks
|
|
|
|
# dosen't work. Copying the files manually which can be found
|
|
|
|
# in ubuntu -dev -classic, -example packages:
|
|
|
|
# maybe some of those files can be removed again
|
|
|
|
installPhase = ''cp -r gen/firebird $out'';
|
|
|
|
|
|
|
|
meta = {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "SQL relational database management system";
|
2018-05-01 05:03:23 +02:00
|
|
|
homepage = https://www.firebirdnews.org;
|
2010-06-03 17:19:56 +02:00
|
|
|
license = ["IDPL" "Interbase-1.0"];
|
|
|
|
maintainers = [stdenv.lib.maintainers.marcweber];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2020-01-17 21:53:24 +01:00
|
|
|
broken = true;
|
2010-06-03 17:19:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|