Files
nixpkgs/pkgs/by-name/ba/bacula/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

85 lines
2.0 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
lib,
stdenv,
fetchurl,
sqlite,
libpq,
zlib,
acl,
ncurses,
openssl,
readline,
gettext,
}:
stdenv.mkDerivation rec {
pname = "bacula";
version = "15.0.3";
src = fetchurl {
url = "mirror://sourceforge/bacula/${pname}-${version}.tar.gz";
sha256 = "sha256-KUr9PS651bccPQ6I/fGetRO/24Q7KNNcBVLkrgYoJ6E=";
};
# libtool.m4 only matches macOS 10.*
postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
substituteInPlace configure \
--replace "10.*)" "*)"
'';
buildInputs = [
libpq
sqlite
zlib
ncurses
openssl
readline
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
gettext # bacula requires CoreFoundation, but its `configure` script will only link it when it detects libintl.
]
# acl relies on attr, which I can't get to build on darwin
++ lib.optional (!stdenv.hostPlatform.isDarwin) acl;
configureFlags = [
"--with-sqlite3=${sqlite.dev}"
"--with-postgresql=${lib.getDev libpq}"
"--with-logdir=/var/log/bacula"
"--with-working-dir=/var/lib/bacula"
"--mandir=\${out}/share/man"
]
++
lib.optional (stdenv.buildPlatform != stdenv.hostPlatform)
"ac_cv_func_setpgrp_void=${if stdenv.hostPlatform.isBSD then "no" else "yes"}"
++ lib.optionals stdenv.hostPlatform.isDarwin [
# baculas `configure` script fails to detect CoreFoundation correctly,
# but these symbols are available in the nixpkgs CoreFoundation framework.
"gt_cv_func_CFLocaleCopyCurrent=yes"
"gt_cv_func_CFPreferencesCopyAppValue=yes"
];
installFlags = [
"logdir=\${out}/logdir"
"working_dir=\${out}/workdir"
];
postInstall = ''
mkdir -p $out/bin
ln -s $out/sbin/* $out/bin
'';
meta = with lib; {
description = "Enterprise ready, Network Backup Tool";
homepage = "http://bacula.org/";
license = with licenses; [
agpl3Only
bsd2
];
maintainers = with maintainers; [
lovek323
eleanor
];
platforms = platforms.all;
};
}