2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, sqlite, postgresql, zlib, acl, ncurses, openssl, readline
|
2020-10-27 00:29:36 +00:00
|
|
|
, CoreFoundation, IOKit
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-01-15 22:18:51 +00:00
|
|
|
pname = "bacula";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "11.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-01-15 22:18:51 +00:00
|
|
|
url = "mirror://sourceforge/bacula/${pname}-${version}.tar.gz";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "sha256-ooaKsNhUIxubAlGt6fUAkbD+PDMfkq+6lnK4G9lp4C8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ postgresql sqlite zlib ncurses openssl readline ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2020-10-27 00:29:36 +00:00
|
|
|
CoreFoundation
|
|
|
|
IOKit
|
|
|
|
]
|
2020-04-24 23:36:52 +00:00
|
|
|
# acl relies on attr, which I can't get to build on darwin
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional (!stdenv.isDarwin) acl;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-sqlite3=${sqlite.dev}"
|
|
|
|
"--with-postgresql=${postgresql}"
|
|
|
|
"--with-logdir=/var/log/bacula"
|
|
|
|
"--with-working-dir=/var/lib/bacula"
|
|
|
|
"--mandir=\${out}/share/man"
|
2021-01-15 22:18:51 +00:00
|
|
|
] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "ac_cv_func_setpgrp_void=yes";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"logdir=\${out}/logdir"
|
|
|
|
"working_dir=\${out}/workdir"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/sbin/* $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Enterprise ready, Network Backup Tool";
|
|
|
|
homepage = "http://bacula.org/";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = with licenses; [ agpl3Only bsd2 ];
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ lovek323 eleanor ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|