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";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "13.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";
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-bgi8vmpKsHDhfp6cTpvE6UTS5b03ZSHKNCxv6WogaH0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
# libtool.m4 only matches macOS 10.*
|
|
|
|
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace "10.*)" "*)"
|
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|