summary refs log tree commit diff
path: root/pkgs/tools/backup/bareos
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-03-27 23:46:47 -0700
committerWilliam A. Kennington III <william@wkennington.com>2015-03-28 02:26:43 -0700
commit5281377fb5132489f481244219cf741926def1cd (patch)
tree2eb9d37bb9ac542affacb52ae6345a4c745cd124 /pkgs/tools/backup/bareos
parent80f331fc6c5a207413c43cb56f078c4294b9a6f0 (diff)
downloadnixpkgs-5281377fb5132489f481244219cf741926def1cd.tar
nixpkgs-5281377fb5132489f481244219cf741926def1cd.tar.gz
nixpkgs-5281377fb5132489f481244219cf741926def1cd.tar.bz2
nixpkgs-5281377fb5132489f481244219cf741926def1cd.tar.lz
nixpkgs-5281377fb5132489f481244219cf741926def1cd.tar.xz
nixpkgs-5281377fb5132489f481244219cf741926def1cd.tar.zst
nixpkgs-5281377fb5132489f481244219cf741926def1cd.zip
bareos: 14.2.3 -> 14.2.4
Diffstat (limited to 'pkgs/tools/backup/bareos')
-rw-r--r--pkgs/tools/backup/bareos/default.nix63
1 files changed, 51 insertions, 12 deletions
diff --git a/pkgs/tools/backup/bareos/default.nix b/pkgs/tools/backup/bareos/default.nix
index fa492835e05..5342b4f489d 100644
--- a/pkgs/tools/backup/bareos/default.nix
+++ b/pkgs/tools/backup/bareos/default.nix
@@ -1,39 +1,78 @@
-{ stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, readline, openssl, python
-, ncurses ? null
-, sqlite ? null, postgresql ? null, mysql ? null, libcap ? null
-, zlib ? null, lzo ? null, acl ? null, ceph ? null
+{ stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, libtool
+, readline ? null, openssl ? null, python ? null, ncurses ? null
+, sqlite ? null, postgresql ? null, mysql ? null, zlib ? null, lzo ? null
+, acl ? null, glusterfs ? null, ceph ? null, libcap ? null
 }:
 
 assert sqlite != null || postgresql != null || mysql != null;
 
 with stdenv.lib;
+let
+  withGlusterfs = "\${with_glusterfs_directory}";
+in
 stdenv.mkDerivation rec {
   name = "bareos-${version}";
-  version = "14.2.3";
+  version = "14.2.4";
 
   src = fetchFromGitHub {
     owner = "bareos";
     repo = "bareos";
     rev = "Release/${version}";
     name = "${name}-src";
-    sha256 = "04z6nwlnk6kk5ghbdw5g34mkypmpk4qpkd08cjxwblg8sdj4j8fl";
+    sha256 = "0shb91pawdgrn6rb4np3zyyxv36899nvwf8jaihkg0wvb01viqzr";
   };
 
   buildInputs = [
     pkgconfig nettools gettext readline openssl python
-    ncurses sqlite postgresql mysql libcap zlib lzo acl ceph
+    ncurses sqlite postgresql mysql zlib lzo acl glusterfs ceph libcap
   ];
 
+  postPatch = ''
+    sed -i 's,\(-I${withGlusterfs}/include\),\1/glusterfs,' configure
+  '';
+
   configureFlags = [
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
     "--exec-prefix=\${out}"
-    "--with-openssl=${openssl}"
-    "--with-python=${python}"
-    "--with-readline=${readline}"
+    "--enable-lockmgr"
+    "--enable-dynamic-storage-backends"
+    "--with-basename=nixos" # For reproducible builds since it uses the hostname otherwise
+    "--with-hostname=nixos" # For reproducible builds since it uses the hostname otherwise
+    "--with-working-dir=/var/lib/bareos"
+    "--with-bsrdir=/var/lib/bareos"
+    "--with-logdir=/var/log/bareos"
+    "--with-pid-dir=/var/run/bareos"
+    "--with-subsys-dir=/var/run/bareos"
     "--enable-ndmp"
     "--enable-lmdb"
-  ] ++ optional (sqlite != null) "--with-sqlite3=${sqlite}"
+    "--enable-batch-insert"
+    "--enable-dynamic-cats-backends"
+    "--enable-sql-pooling"
+    "--enable-scsi-crypto"
+  ] ++ optionals (readline != null) [ "--disable-conio" "--enable-readline" "--with-readline=${readline}" ]
+    ++ optional (python != null) "--with-python=${python}"
+    ++ optional (openssl != null) "--with-openssl=${openssl}"
+    ++ optional (sqlite != null) "--with-sqlite3=${sqlite}"
     ++ optional (postgresql != null) "--with-postgresql=${postgresql}"
-    ++ optional (mysql != null) "--with-mysql=${mysql}";
+    ++ optional (mysql != null) "--with-mysql=${mysql}"
+    ++ optional (zlib != null) "--with-zlib=${zlib}"
+    ++ optional (lzo != null) "--with-lzo=${lzo}"
+    ++ optional (acl != null) "--enable-acl"
+    ++ optional (glusterfs != null) "--with-glusterfs=${glusterfs}"
+    ++ optional (ceph != null) "--with-cephfs=${ceph}";
+
+  installFlags = [ "DESTDIR=\${out}" ];
+
+  postInstall = ''
+    mv $out/$out/* $out
+    DIR=$out/$out
+    while rmdir $DIR 2>/dev/null; do
+      DIR="$(dirname "$DIR")"
+    done
+
+    rm -rf /tmp /var
+  '';
 
   meta = with stdenv.lib; {
     homepage = http://www.bareos.org/;