nixpkgs/pkgs/tools/backup/bareos/default.nix

78 lines
2.6 KiB
Nix
Raw Normal View History

2015-03-28 07:46:47 +01:00
{ stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, libtool
, readline ? null, openssl ? null, python ? null, ncurses ? null
, sqlite ? null, postgresql ? null, mysql ? null, zlib ? null, lzo ? null
, acl ? null, glusterfs ? null, ceph ? null, libcap ? null
2014-11-04 19:54:25 +01:00
}:
assert sqlite != null || postgresql != null || mysql != null;
with stdenv.lib;
2015-03-28 07:46:47 +01:00
let
withGlusterfs = "\${with_glusterfs_directory}";
in
2014-11-04 19:54:25 +01:00
stdenv.mkDerivation rec {
name = "bareos-${version}";
2015-03-28 07:46:47 +01:00
version = "14.2.4";
2014-11-04 19:54:25 +01:00
src = fetchFromGitHub {
owner = "bareos";
repo = "bareos";
rev = "Release/${version}";
name = "${name}-src";
2015-03-28 07:46:47 +01:00
sha256 = "0shb91pawdgrn6rb4np3zyyxv36899nvwf8jaihkg0wvb01viqzr";
2014-11-04 19:54:25 +01:00
};
buildInputs = [
pkgconfig nettools gettext readline openssl python
ncurses sqlite postgresql mysql.lib zlib lzo acl glusterfs ceph libcap
2014-11-04 19:54:25 +01:00
];
2015-03-28 07:46:47 +01:00
postPatch = ''
sed -i 's,\(-I${withGlusterfs}/include\),\1/glusterfs,' configure
'';
2014-11-04 19:54:25 +01:00
configureFlags = [
2015-03-28 07:46:47 +01:00
"--sysconfdir=/etc"
2014-11-04 19:54:25 +01:00
"--exec-prefix=\${out}"
2015-03-28 07:46:47 +01: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"
"--with-pid-dir=/var/run/bareos"
"--with-subsys-dir=/var/run/bareos"
2014-11-04 19:54:25 +01:00
"--enable-ndmp"
"--enable-lmdb"
2015-03-28 07:46:47 +01:00
"--enable-batch-insert"
"--enable-dynamic-cats-backends"
"--enable-sql-pooling"
"--enable-scsi-crypto"
] ++ optionals (readline != null) [ "--disable-conio" "--enable-readline" "--with-readline=${readline}" ]
++ optional (python != null) "--with-python=${python}"
++ optional (openssl != null) "--with-openssl=${openssl}"
++ optional (sqlite != null) "--with-sqlite3=${sqlite}"
2014-11-04 19:54:25 +01:00
++ optional (postgresql != null) "--with-postgresql=${postgresql}"
++ optional (mysql != null) "--with-mysql=${mysql.lib}"
2015-03-28 07:46:47 +01:00
++ optional (zlib != null) "--with-zlib=${zlib}"
++ optional (lzo != null) "--with-lzo=${lzo}"
++ optional (acl != null) "--enable-acl"
++ optional (glusterfs != null) "--with-glusterfs=${glusterfs}"
++ optional (ceph != null) "--with-cephfs=${ceph}";
2015-04-05 07:11:45 +02:00
installFlags = [
"sysconfdir=\${out}/etc"
"working_dir=\${TMPDIR}"
"log_dir=\${TMPDIR}"
];
2014-11-04 19:54:25 +01:00
meta = with stdenv.lib; {
homepage = http://www.bareos.org/;
description = "a fork of the bacula project.";
license = licenses.agpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ wkennington ];
};
}