at 22.05-pre 47 lines 1.4 kB view raw
1{ lib, stdenv, fetchurl, sqlite, postgresql, zlib, acl, ncurses, openssl, readline 2, CoreFoundation, IOKit 3}: 4 5stdenv.mkDerivation rec { 6 pname = "bacula"; 7 version = "11.0.5"; 8 9 src = fetchurl { 10 url = "mirror://sourceforge/bacula/${pname}-${version}.tar.gz"; 11 sha256 = "sha256-71s7Z4EEQiAbgNwdR8zvd7XtN4/hKFQG86c0AbboERo="; 12 }; 13 14 buildInputs = [ postgresql sqlite zlib ncurses openssl readline ] 15 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 16 CoreFoundation 17 IOKit 18 ] 19 # acl relies on attr, which I can't get to build on darwin 20 ++ lib.optional (!stdenv.isDarwin) acl; 21 22 configureFlags = [ 23 "--with-sqlite3=${sqlite.dev}" 24 "--with-postgresql=${postgresql}" 25 "--with-logdir=/var/log/bacula" 26 "--with-working-dir=/var/lib/bacula" 27 "--mandir=\${out}/share/man" 28 ] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "ac_cv_func_setpgrp_void=yes"; 29 30 installFlags = [ 31 "logdir=\${out}/logdir" 32 "working_dir=\${out}/workdir" 33 ]; 34 35 postInstall = '' 36 mkdir -p $out/bin 37 ln -s $out/sbin/* $out/bin 38 ''; 39 40 meta = with lib; { 41 description = "Enterprise ready, Network Backup Tool"; 42 homepage = "http://bacula.org/"; 43 license = with licenses; [ agpl3Only bsd2 ]; 44 maintainers = with maintainers; [ lovek323 eleanor ]; 45 platforms = platforms.all; 46 }; 47}