2021-01-17 09:17:16 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, nettools, gettext, flex
|
2016-11-09 10:11:09 +00:00
|
|
|
, readline ? null, openssl ? null, python2 ? null, ncurses ? null, rocksdb
|
2019-09-22 07:38:09 +00:00
|
|
|
, sqlite ? null, postgresql ? null, libmysqlclient ? null, zlib ? null, lzo ? null
|
2015-09-18 21:52:43 +00:00
|
|
|
, jansson ? null, acl ? null, glusterfs ? null, libceph ? null, libcap ? null
|
2014-11-04 18:54:25 +00:00
|
|
|
}:
|
|
|
|
|
2019-09-22 07:38:09 +00:00
|
|
|
assert sqlite != null || postgresql != null || libmysqlclient != null;
|
2014-11-04 18:54:25 +00:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
with lib;
|
2015-03-28 06:46:47 +00:00
|
|
|
let
|
|
|
|
withGlusterfs = "\${with_glusterfs_directory}";
|
|
|
|
in
|
2014-11-04 18:54:25 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "bareos";
|
2018-09-01 12:12:07 +00:00
|
|
|
version = "17.2.7";
|
2014-11-04 18:54:25 +00:00
|
|
|
|
2015-01-14 16:38:26 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bareos";
|
|
|
|
repo = "bareos";
|
|
|
|
rev = "Release/${version}";
|
2019-08-15 12:41:18 +00:00
|
|
|
name = "${pname}-${version}-src";
|
2018-09-01 12:12:07 +00:00
|
|
|
sha256 = "1awf5i4mw2nfd7z0dmqnywapnx9nz6xwqv8rxp0y2mnrhzdpbrbz";
|
2014-11-04 18:54:25 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2014-11-04 18:54:25 +00:00
|
|
|
buildInputs = [
|
2016-11-09 10:11:09 +00:00
|
|
|
nettools gettext readline openssl python2 flex ncurses sqlite postgresql
|
2019-09-22 07:38:09 +00:00
|
|
|
libmysqlclient zlib lzo jansson acl glusterfs libceph libcap rocksdb
|
2014-11-04 18:54:25 +00:00
|
|
|
];
|
|
|
|
|
2015-03-28 06:46:47 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's,\(-I${withGlusterfs}/include\),\1/glusterfs,' configure
|
|
|
|
'';
|
|
|
|
|
2014-11-04 18:54:25 +00:00
|
|
|
configureFlags = [
|
2015-03-28 06:46:47 +00:00
|
|
|
"--sysconfdir=/etc"
|
2014-11-04 18:54:25 +00:00
|
|
|
"--exec-prefix=\${out}"
|
2015-03-28 06:46:47 +00:00
|
|
|
"--enable-lockmgr"
|
|
|
|
"--enable-dynamic-storage-backends"
|
|
|
|
"--with-basename=nixos" # For reproducible builds since it uses the hostname otherwise
|
|
|
|
"--with-hostname=nixos" # For reproducible builds since it uses the hostname otherwise
|
|
|
|
"--with-working-dir=/var/lib/bareos"
|
|
|
|
"--with-bsrdir=/var/lib/bareos"
|
|
|
|
"--with-logdir=/var/log/bareos"
|
2018-12-19 21:54:12 +00:00
|
|
|
"--with-pid-dir=/run/bareos"
|
|
|
|
"--with-subsys-dir=/run/bareos"
|
2014-11-04 18:54:25 +00:00
|
|
|
"--enable-ndmp"
|
|
|
|
"--enable-lmdb"
|
2015-03-28 06:46:47 +00:00
|
|
|
"--enable-batch-insert"
|
|
|
|
"--enable-dynamic-cats-backends"
|
|
|
|
"--enable-sql-pooling"
|
|
|
|
"--enable-scsi-crypto"
|
2016-04-16 17:46:17 +00:00
|
|
|
] ++ optionals (readline != null) [ "--disable-conio" "--enable-readline" "--with-readline=${readline.dev}" ]
|
2016-11-09 10:11:09 +00:00
|
|
|
++ optional (python2 != null) "--with-python=${python2}"
|
2016-04-16 17:44:32 +00:00
|
|
|
++ optional (openssl != null) "--with-openssl=${openssl.dev}"
|
2016-04-16 17:47:23 +00:00
|
|
|
++ optional (sqlite != null) "--with-sqlite3=${sqlite.dev}"
|
2014-11-04 18:54:25 +00:00
|
|
|
++ optional (postgresql != null) "--with-postgresql=${postgresql}"
|
2019-09-22 07:38:09 +00:00
|
|
|
++ optional (libmysqlclient != null) "--with-mysql=${libmysqlclient}"
|
2016-04-16 17:50:01 +00:00
|
|
|
++ optional (zlib != null) "--with-zlib=${zlib.dev}"
|
2015-03-28 06:46:47 +00:00
|
|
|
++ optional (lzo != null) "--with-lzo=${lzo}"
|
2015-09-18 21:52:43 +00:00
|
|
|
++ optional (jansson != null) "--with-jansson=${jansson}"
|
2015-03-28 06:46:47 +00:00
|
|
|
++ optional (acl != null) "--enable-acl"
|
|
|
|
++ optional (glusterfs != null) "--with-glusterfs=${glusterfs}"
|
2015-04-22 23:01:50 +00:00
|
|
|
++ optional (libceph != null) "--with-cephfs=${libceph}";
|
2015-03-28 06:46:47 +00:00
|
|
|
|
2015-04-05 05:11:45 +00:00
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
2015-09-18 21:52:43 +00:00
|
|
|
"confdir=\${out}/etc/bareos"
|
|
|
|
"scriptdir=\${out}/etc/bareos"
|
2015-04-05 05:11:45 +00:00
|
|
|
"working_dir=\${TMPDIR}"
|
|
|
|
"log_dir=\${TMPDIR}"
|
2015-07-13 11:43:11 +00:00
|
|
|
"sbindir=\${out}/bin"
|
2015-04-05 05:11:45 +00:00
|
|
|
];
|
2014-11-04 18:54:25 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.bareos.org/";
|
2015-04-28 08:54:58 +00:00
|
|
|
description = "A fork of the bacula project";
|
2014-11-04 18:54:25 +00:00
|
|
|
license = licenses.agpl3;
|
|
|
|
platforms = platforms.unix;
|
2019-09-14 13:04:02 +00:00
|
|
|
broken = true;
|
2014-11-04 18:54:25 +00:00
|
|
|
};
|
|
|
|
}
|