2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, sqlite, postgresql, zlib, acl, ncurses, openssl, readline
|
2020-10-25 04:04:37 +00:00
|
|
|
, CoreFoundation, IOKit
|
|
|
|
}:
|
2011-08-05 19:18:02 +00:00
|
|
|
|
2013-02-22 20:24:20 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-12-27 13:43:54 +00:00
|
|
|
pname = "bacula";
|
2023-07-13 02:31:27 +00:00
|
|
|
version = "13.0.3";
|
2011-08-05 19:18:02 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-12-27 13:43:54 +00:00
|
|
|
url = "mirror://sourceforge/bacula/${pname}-${version}.tar.gz";
|
2023-07-13 02:31:27 +00:00
|
|
|
sha256 = "sha256-CUnDK+EJBYXojkwB2CgALodgMTbYfFmKKd/0K7PtKkA=";
|
2011-08-05 19:18:02 +00:00
|
|
|
};
|
|
|
|
|
2022-11-03 11:23:41 +00:00
|
|
|
# libtool.m4 only matches macOS 10.*
|
|
|
|
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace "10.*)" "*)"
|
|
|
|
'';
|
|
|
|
|
2013-09-06 00:33:28 +00:00
|
|
|
buildInputs = [ postgresql sqlite zlib ncurses openssl readline ]
|
2021-01-15 09:19:50 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2020-10-25 04:04:37 +00:00
|
|
|
CoreFoundation
|
|
|
|
IOKit
|
|
|
|
]
|
2013-09-06 00:33:28 +00:00
|
|
|
# acl relies on attr, which I can't get to build on darwin
|
2021-01-15 09:19:50 +00:00
|
|
|
++ lib.optional (!stdenv.isDarwin) acl;
|
2011-08-05 19:18:02 +00:00
|
|
|
|
2018-03-19 09:26:46 +00:00
|
|
|
configureFlags = [
|
2016-04-16 17:47:23 +00:00
|
|
|
"--with-sqlite3=${sqlite.dev}"
|
2017-09-27 19:48:39 +00:00
|
|
|
"--with-postgresql=${postgresql}"
|
2018-03-19 09:26:46 +00:00
|
|
|
"--with-logdir=/var/log/bacula"
|
|
|
|
"--with-working-dir=/var/lib/bacula"
|
|
|
|
"--mandir=\${out}/share/man"
|
2021-01-15 09:19:50 +00:00
|
|
|
] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "ac_cv_func_setpgrp_void=yes";
|
2018-03-19 09:26:46 +00:00
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"logdir=\${out}/logdir"
|
|
|
|
"working_dir=\${out}/workdir"
|
2013-03-22 00:53:41 +00:00
|
|
|
];
|
2011-08-05 19:18:02 +00:00
|
|
|
|
2013-03-27 01:24:55 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/sbin/* $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2011-08-05 19:18:02 +00:00
|
|
|
description = "Enterprise ready, Network Backup Tool";
|
2020-03-01 22:28:37 +00:00
|
|
|
homepage = "http://bacula.org/";
|
2020-12-27 13:43:54 +00:00
|
|
|
license = with licenses; [ agpl3Only bsd2 ];
|
2021-03-03 10:50:26 +00:00
|
|
|
maintainers = with maintainers; [ lovek323 eleanor ];
|
2015-05-27 19:56:04 +00:00
|
|
|
platforms = platforms.all;
|
2011-08-05 19:18:02 +00:00
|
|
|
};
|
|
|
|
}
|