aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/backup
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
committerMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
commitc4625b175f8200f643fd6e11010932ea44c78433 (patch)
treebce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/tools/backup
parent49f735974dd103039ddc4cb576bb76555164a9e7 (diff)
parentd661aa56a8843e991261510c1bb28fdc2f6975ae (diff)
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7 git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/backup')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/amazon-glacier-cmd-interface/default.nix33
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/automysqlbackup/default.nix32
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/bacula/default.nix40
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/bareos/default.nix82
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/bdsync/default.nix40
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/borg/default.nix71
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/btar/default.nix21
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/btrbk/default.nix52
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/bup/default.nix66
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/burp/default.nix30
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/chunksync/default.nix32
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/dar/default.nix51
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/ddar/default.nix40
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/dedup/default.nix34
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/dirvish/default.nix62
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/diskrsync/default.nix30
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/diskrsync/deps.nix48
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/dump/default.nix24
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/duplicacy/default.nix32
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/duplicacy/deps.nix336
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/duplicati/default.nix37
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/default.nix121
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/gnutar-in-test.patch18
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/linux-disable-timezone-test.patch10
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch49
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/duply/default.nix40
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/easysnap/default.nix31
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/flockit/default.nix51
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/grab-site/default.nix38
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/hpe-ltfs/default.nix30
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/httrack/default.nix22
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/httrack/qt.nix40
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/iceshelf/default.nix35
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/kopia/default.nix43
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/luckybackup/default.nix45
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/Gemfile2
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/Gemfile.lock19
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/default.nix34
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/gemset.nix36
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/monolith/default.nix34
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/mt-st/default.nix23
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/mtx/default.nix27
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/mydumper/default.nix30
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/ori/default.nix29
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/partclone/default.nix50
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/partimage/default.nix47
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/partimage/gentoos-zlib.patch33
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/2_4.nix6
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/8_0.nix14
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/generic.nix58
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/pyznap/default.nix29
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/rdedup/default.nix37
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/rdedup/v3.1.1-fix-Cargo.lock.patch28
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/rdiff-backup/default.nix23
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/rdiff-backup/fix-librsync-rs_default_strong_len.patch20
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/rdup/default.nix24
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/restic/default.nix41
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix32
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/rotate-backups/default.nix23
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/rsbep/default.nix37
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/rsnapshot/default.nix27
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/s3ql/default.nix37
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/sanoid/default.nix75
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/stenc/default.nix21
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/store-backup/default.nix111
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnap/default.nix41
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnapper/default.nix25
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnapper/remove-argparse.patch10
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/tsm-client/default.nix165
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit-manifest-maker/default.nix31
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit-manifest-maker/eggs.nix431
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit/default.nix41
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit/eggs.nix486
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/wal-e/default.nix32
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/wal-g/default.nix32
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/zbackup/default.nix17
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/zfs-prune-snapshots/default.nix30
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/zfs-replicate/default.nix42
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/zfsbackup/default.nix25
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/zfsbackup/deps.nix273
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/zfsnap/default.nix42
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/backup/znapzend/default.nix87
82 files changed, 4583 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/amazon-glacier-cmd-interface/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/amazon-glacier-cmd-interface/default.nix
new file mode 100644
index 000000000000..a872060ce212
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/amazon-glacier-cmd-interface/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, python2Packages }:
+
+python2Packages.buildPythonApplication rec {
+ pname = "amazon-glacier-cmd-interface";
+ version = "2016-09-01";
+
+ src = fetchFromGitHub {
+ owner = "uskudnik";
+ repo = "amazon-glacier-cmd-interface";
+ rev = "9f28132f9872e1aad9e956e5613b976504e930c8";
+ sha256 = "1k5z8kda9v6klr4536pf5qbq9zklxvyysv7nc48gllschl09jywc";
+ };
+
+ # argparse is part of the standardlib
+ prePatch = ''
+ substituteInPlace setup.py --replace "'argparse'," ""
+ '';
+
+ propagatedBuildInputs = with python2Packages; [
+ boto
+ dateutil
+ prettytable
+ pytz
+ ];
+
+ meta = {
+ description = "Command line interface for Amazon Glacier";
+ homepage = "https://github.com/uskudnik/amazon-glacier-cmd-interface";
+ license = stdenv.lib.licenses.gpl2;
+ maintainers = [ stdenv.lib.maintainers.lovek323 ];
+ };
+
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/automysqlbackup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/automysqlbackup/default.nix
new file mode 100644
index 000000000000..acdf31e47d8c
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/automysqlbackup/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, makeWrapper, mysql, mailutils, pbzip2, pigz, bzip2, gzip }:
+
+stdenv.mkDerivation rec {
+ pname = "automysqlbackup";
+ version = "3.0_rc6";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%203.0/automysqlbackup-v${version}.tar.gz";
+ sha256 = "1h1wq86q6my1a682nr8pjagjhai4lxz967m17lhpw1vb116hd7l8";
+ };
+
+ sourceRoot = ".";
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ installPhase = ''
+ mkdir -p $out/bin $out/etc
+
+ cp automysqlbackup $out/bin/
+ cp automysqlbackup.conf $out/etc/
+
+ wrapProgram $out/bin/automysqlbackup --prefix PATH : ${stdenv.lib.makeBinPath [ mysql mailutils pbzip2 pigz bzip2 gzip ]}
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A script to run daily, weekly and monthly backups for your MySQL database";
+ homepage = "https://sourceforge.net/projects/automysqlbackup/";
+ platforms = platforms.linux;
+ maintainers = [ maintainers.aanderse ];
+ license = licenses.gpl2Plus;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/bacula/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/bacula/default.nix
new file mode 100644
index 000000000000..8bf253a7b121
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/bacula/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, sqlite, postgresql, zlib, acl, ncurses, openssl, readline }:
+
+stdenv.mkDerivation rec {
+ name = "bacula-9.6.5";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/bacula/${name}.tar.gz";
+ sha256 = "0yn7qwkzix78bs811vmrn5gbywy7ggnsv72mdjz2lirqc6w3a3si";
+ };
+
+ buildInputs = [ postgresql sqlite zlib ncurses openssl readline ]
+ # acl relies on attr, which I can't get to build on darwin
+ ++ stdenv.lib.optional (!stdenv.isDarwin) acl;
+
+ configureFlags = [
+ "--with-sqlite3=${sqlite.dev}"
+ "--with-postgresql=${postgresql}"
+ "--with-logdir=/var/log/bacula"
+ "--with-working-dir=/var/lib/bacula"
+ "--mandir=\${out}/share/man"
+ ] ++ stdenv.lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "ac_cv_func_setpgrp_void=yes";
+
+ installFlags = [
+ "logdir=\${out}/logdir"
+ "working_dir=\${out}/workdir"
+ ];
+
+ postInstall = ''
+ mkdir -p $out/bin
+ ln -s $out/sbin/* $out/bin
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Enterprise ready, Network Backup Tool";
+ homepage = "http://bacula.org/";
+ license = licenses.gpl2;
+ maintainers = with maintainers; [ domenkozar lovek323 eleanor ];
+ platforms = platforms.all;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/bareos/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/bareos/default.nix
new file mode 100644
index 000000000000..53de4853c627
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/bareos/default.nix
@@ -0,0 +1,82 @@
+{ stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, flex
+, readline ? null, openssl ? null, python2 ? null, ncurses ? null, rocksdb
+, sqlite ? null, postgresql ? null, libmysqlclient ? null, zlib ? null, lzo ? null
+, jansson ? null, acl ? null, glusterfs ? null, libceph ? null, libcap ? null
+}:
+
+assert sqlite != null || postgresql != null || libmysqlclient != null;
+
+with stdenv.lib;
+let
+ withGlusterfs = "\${with_glusterfs_directory}";
+in
+stdenv.mkDerivation rec {
+ pname = "bareos";
+ version = "17.2.7";
+
+ src = fetchFromGitHub {
+ owner = "bareos";
+ repo = "bareos";
+ rev = "Release/${version}";
+ name = "${pname}-${version}-src";
+ sha256 = "1awf5i4mw2nfd7z0dmqnywapnx9nz6xwqv8rxp0y2mnrhzdpbrbz";
+ };
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [
+ nettools gettext readline openssl python2 flex ncurses sqlite postgresql
+ libmysqlclient zlib lzo jansson acl glusterfs libceph libcap rocksdb
+ ];
+
+ postPatch = ''
+ sed -i 's,\(-I${withGlusterfs}/include\),\1/glusterfs,' configure
+ '';
+
+ configureFlags = [
+ "--sysconfdir=/etc"
+ "--exec-prefix=\${out}"
+ "--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=/run/bareos"
+ "--with-subsys-dir=/run/bareos"
+ "--enable-ndmp"
+ "--enable-lmdb"
+ "--enable-batch-insert"
+ "--enable-dynamic-cats-backends"
+ "--enable-sql-pooling"
+ "--enable-scsi-crypto"
+ ] ++ optionals (readline != null) [ "--disable-conio" "--enable-readline" "--with-readline=${readline.dev}" ]
+ ++ optional (python2 != null) "--with-python=${python2}"
+ ++ optional (openssl != null) "--with-openssl=${openssl.dev}"
+ ++ optional (sqlite != null) "--with-sqlite3=${sqlite.dev}"
+ ++ optional (postgresql != null) "--with-postgresql=${postgresql}"
+ ++ optional (libmysqlclient != null) "--with-mysql=${libmysqlclient}"
+ ++ optional (zlib != null) "--with-zlib=${zlib.dev}"
+ ++ optional (lzo != null) "--with-lzo=${lzo}"
+ ++ optional (jansson != null) "--with-jansson=${jansson}"
+ ++ optional (acl != null) "--enable-acl"
+ ++ optional (glusterfs != null) "--with-glusterfs=${glusterfs}"
+ ++ optional (libceph != null) "--with-cephfs=${libceph}";
+
+ installFlags = [
+ "sysconfdir=\${out}/etc"
+ "confdir=\${out}/etc/bareos"
+ "scriptdir=\${out}/etc/bareos"
+ "working_dir=\${TMPDIR}"
+ "log_dir=\${TMPDIR}"
+ "sbindir=\${out}/bin"
+ ];
+
+ meta = with stdenv.lib; {
+ homepage = "http://www.bareos.org/";
+ description = "A fork of the bacula project";
+ license = licenses.agpl3;
+ platforms = platforms.unix;
+ broken = true;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/bdsync/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/bdsync/default.nix
new file mode 100644
index 000000000000..53704ce39d42
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/bdsync/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub
+, openssl
+, pandoc
+, which
+}:
+
+stdenv.mkDerivation rec {
+ pname = "bdsync";
+ version = "0.11.1";
+
+ src = fetchFromGitHub {
+ owner = "TargetHolding";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "11grdyc6fgw93jvj965awsycqw5qbzsdys7n8farqnmya8qv8gac";
+ };
+
+ nativeBuildInputs = [ pandoc which ];
+ buildInputs = [ openssl ];
+
+ postPatch = ''
+ patchShebangs ./tests.sh
+ patchShebangs ./tests/
+ '';
+
+ doCheck = true;
+
+ installPhase = ''
+ install -Dm755 bdsync -t $out/bin/
+ install -Dm644 bdsync.1 -t $out/share/man/man1/
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Fast block device synchronizing tool";
+ homepage = "https://github.com/TargetHolding/bdsync";
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ jluttine ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/borg/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/borg/default.nix
new file mode 100644
index 000000000000..7bfb9e573922
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/borg/default.nix
@@ -0,0 +1,71 @@
+{ stdenv, python3, acl, libb2, lz4, zstd, openssl, openssh }:
+
+python3.pkgs.buildPythonApplication rec {
+ pname = "borgbackup";
+ version = "1.1.14";
+
+ src = python3.pkgs.fetchPypi {
+ inherit pname version;
+ sha256 = "1fpdj73cgp96xwasdcifxl7q2pr1my2f4vfdjpv771llri3hgfvx";
+ };
+
+ nativeBuildInputs = with python3.pkgs; [
+ # For building documentation:
+ sphinx guzzle_sphinx_theme
+ ];
+ buildInputs = [
+ libb2 lz4 zstd openssl python3.pkgs.setuptools_scm
+ ] ++ stdenv.lib.optionals stdenv.isLinux [ acl ];
+ propagatedBuildInputs = with python3.pkgs; [
+ cython llfuse
+ ];
+
+ preConfigure = ''
+ export BORG_OPENSSL_PREFIX="${openssl.dev}"
+ export BORG_LZ4_PREFIX="${lz4.dev}"
+ export BORG_LIBB2_PREFIX="${libb2}"
+ export BORG_LIBZSTD_PREFIX="${zstd}"
+ '';
+
+ makeWrapperArgs = [
+ ''--prefix PATH ':' "${openssh}/bin"''
+ ];
+
+ postInstall = ''
+ make -C docs singlehtml
+ mkdir -p $out/share/doc/borg
+ cp -R docs/_build/singlehtml $out/share/doc/borg/html
+
+ make -C docs man
+ mkdir -p $out/share/man
+ cp -R docs/_build/man $out/share/man/man1
+
+ mkdir -p $out/share/bash-completion/completions
+ cp scripts/shell_completions/bash/borg $out/share/bash-completion/completions/
+
+ mkdir -p $out/share/fish/vendor_completions.d
+ cp scripts/shell_completions/fish/borg.fish $out/share/fish/vendor_completions.d/
+
+ mkdir -p $out/share/zsh/site-functions
+ cp scripts/shell_completions/zsh/_borg $out/share/zsh/site-functions/
+ '';
+
+ checkInputs = with python3.pkgs; [
+ pytest
+ ];
+
+ checkPhase = ''
+ HOME=$(mktemp -d) py.test --pyargs borg.testsuite
+ '';
+
+ # 64 failures, needs pytest-benchmark
+ doCheck = false;
+
+ meta = with stdenv.lib; {
+ description = "Deduplicating archiver with compression and encryption";
+ homepage = "https://www.borgbackup.org";
+ license = licenses.bsd3;
+ platforms = platforms.unix; # Darwin and FreeBSD mentioned on homepage
+ maintainers = with maintainers; [ flokli dotlambda globin ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/btar/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/btar/default.nix
new file mode 100644
index 000000000000..3727a4b7f427
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/btar/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, librsync }:
+
+stdenv.mkDerivation rec {
+ name = "btar-1.1.1";
+ src = fetchurl {
+ url = "http://vicerveza.homeunix.net/~viric/soft/btar/${name}.tar.gz";
+ sha256 = "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd";
+ };
+
+ buildInputs = [ librsync ];
+
+ installPhase = "make install PREFIX=$out";
+
+ meta = {
+ description = "Tar-compatible block-based archiver";
+ license = stdenv.lib.licenses.gpl3Plus;
+ homepage = "http://viric.name/cgi-bin/btar";
+ platforms = with stdenv.lib.platforms; all;
+ maintainers = with stdenv.lib.maintainers; [viric];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/btrbk/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/btrbk/default.nix
new file mode 100644
index 000000000000..0c528bcea1ec
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/btrbk/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchurl, coreutils, bash, btrfs-progs, openssh, perl, perlPackages
+, utillinux, asciidoc, asciidoctor, mbuffer, makeWrapper }:
+
+stdenv.mkDerivation rec {
+ pname = "btrbk";
+ version = "0.29.1";
+
+ src = fetchurl {
+ url = "https://digint.ch/download/btrbk/releases/${pname}-${version}.tar.xz";
+ sha256 = "153inyvvnl17hq1w3nsa783havznaykdam2yrj775bmi2wg6fvwn";
+ };
+
+ nativeBuildInputs = [ asciidoc asciidoctor makeWrapper ];
+
+ buildInputs = with perlPackages; [ perl DateCalc ];
+
+ preInstall = ''
+ for f in $(find . -name Makefile); do
+ substituteInPlace "$f" \
+ --replace "/usr" "$out" \
+ --replace "/etc" "$out/etc"
+ done
+
+ # Tainted Mode disables PERL5LIB
+ substituteInPlace btrbk --replace "perl -T" "perl"
+
+ # Fix btrbk-mail
+ substituteInPlace contrib/cron/btrbk-mail \
+ --replace "/bin/date" "${coreutils}/bin/date" \
+ --replace "/bin/echo" "${coreutils}/bin/echo" \
+ --replace '$btrbk' 'btrbk'
+
+ # Fix SSH filter script
+ sed -i '/^export PATH/d' ssh_filter_btrbk.sh
+ substituteInPlace ssh_filter_btrbk.sh --replace logger ${utillinux}/bin/logger
+ '';
+
+ preFixup = ''
+ wrapProgram $out/sbin/btrbk \
+ --set PERL5LIB $PERL5LIB \
+ --prefix PATH ':' "${stdenv.lib.makeBinPath [ btrfs-progs bash mbuffer openssh ]}"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A backup tool for btrfs subvolumes";
+ homepage = "https://digint.ch/btrbk";
+ license = licenses.gpl3;
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ asymmetric ];
+ inherit version;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/bup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/bup/default.nix
new file mode 100644
index 000000000000..ee6ae0a29342
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/bup/default.nix
@@ -0,0 +1,66 @@
+{ stdenv, fetchFromGitHub, makeWrapper
+, perl, pandoc, python2Packages, git
+, par2cmdline ? null, par2Support ? true
+}:
+
+assert par2Support -> par2cmdline != null;
+
+let version = "0.31"; in
+
+with stdenv.lib;
+
+stdenv.mkDerivation {
+ pname = "bup";
+ inherit version;
+
+ src = fetchFromGitHub {
+ repo = "bup";
+ owner = "bup";
+ rev = version;
+ sha256 = "03kmmdlgg0p5z39bhckkf91mmq55wghb93ghqvv9f9gaby1diw4z";
+ };
+
+ buildInputs = [
+ git
+ (python2Packages.python.withPackages
+ (p: with p; [ setuptools tornado ]
+ ++ stdenv.lib.optionals (!stdenv.isDarwin) [ pyxattr pylibacl fuse ]))
+ ];
+ nativeBuildInputs = [ pandoc perl makeWrapper ];
+
+ postPatch = ''
+ patchShebangs .
+ substituteInPlace Makefile --replace "-Werror" ""
+ substituteInPlace Makefile --replace "./format-subst.pl" "${perl}/bin/perl ./format-subst.pl"
+ '' + optionalString par2Support ''
+ substituteInPlace cmd/fsck-cmd.py --replace "['par2'" "['${par2cmdline}/bin/par2'"
+ '';
+
+ dontAddPrefix = true;
+
+ makeFlags = [
+ "MANDIR=$(out)/share/man"
+ "DOCDIR=$(out)/share/doc/bup"
+ "BINDIR=$(out)/bin"
+ "LIBDIR=$(out)/lib/bup"
+ ];
+
+ postInstall = ''
+ wrapProgram $out/bin/bup \
+ --prefix PATH : ${git}/bin
+ '';
+
+ meta = {
+ homepage = "https://github.com/bup/bup";
+ description = "Efficient file backup system based on the git packfile format";
+ license = licenses.gpl2Plus;
+
+ longDescription = ''
+ Highly efficient file backup system based on the git packfile format.
+ Capable of doing *fast* incremental backups of virtual machine images.
+ '';
+
+ platforms = platforms.linux ++ platforms.darwin;
+ maintainers = with maintainers; [ muflax ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/burp/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/burp/default.nix
new file mode 100644
index 000000000000..d9b4df98790e
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/burp/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
+, acl, librsync, ncurses, openssl, zlib, uthash }:
+
+stdenv.mkDerivation rec {
+ pname = "burp";
+ version = "2.2.18";
+
+ src = fetchFromGitHub {
+ owner = "grke";
+ repo = "burp";
+ rev = version;
+ sha256 = "1zhq240kz881vs2s620qp0kifmgr582caalm85ls789w9rmdkhjl";
+ };
+
+ nativeBuildInputs = [ autoreconfHook pkgconfig ];
+ buildInputs = [ librsync ncurses openssl zlib uthash ]
+ ++ stdenv.lib.optional (!stdenv.isDarwin) acl;
+
+ configureFlags = [ "--localstatedir=/var" ];
+
+ installFlags = [ "localstatedir=/tmp" ];
+
+ meta = with stdenv.lib; {
+ description = "BURP - BackUp and Restore Program";
+ homepage = "https://burp.grke.org";
+ license = licenses.agpl3;
+ maintainers = with maintainers; [ tokudan ];
+ platforms = platforms.all;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/chunksync/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/chunksync/default.nix
new file mode 100644
index 000000000000..6885f3f8265a
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/chunksync/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, openssl, perl }:
+
+stdenv.mkDerivation rec {
+ version = "0.4";
+ pname = "chunksync";
+
+ src = fetchurl {
+ url = "https://chunksync.florz.de/chunksync_${version}.tar.gz";
+ sha256 = "1gwqp1kjwhcmwhynilakhzpzgc0c6kk8c9vkpi30gwwrwpz3cf00";
+ };
+
+ buildInputs = [openssl perl];
+
+ NIX_LDFLAGS = "-lgcc_s";
+
+ makeFlags = [
+ "DESTDIR=$(out)"
+ "PREFIX="
+ ];
+
+ preInstall = ''
+ mkdir -p $out/bin
+ mkdir -p $out/share/man/man1
+ '';
+
+ meta = {
+ description = "Space-efficient incremental backups of large files or block devices";
+ homepage = "http://chunksync.florz.de/";
+ license = stdenv.lib.licenses.gpl2;
+ platforms = with stdenv.lib.platforms; linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/dar/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/dar/default.nix
new file mode 100644
index 000000000000..1f379feece49
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/dar/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchurl
+, attr, e2fsprogs
+, curl, librsync, libthreadar
+, gpgme, libgcrypt, openssl
+, bzip2, lzo, xz, zlib
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+ version = "2.6.10";
+ pname = "dar";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/dar/${pname}-${version}.tar.gz";
+ sha256 = "1ryj4xxar18hshg38j1ljhplypgmfprwqn72k1jwxi28qravg80n";
+ };
+
+ outputs = [ "out" "dev" ];
+
+ buildInputs = [
+ curl librsync libthreadar
+ gpgme libgcrypt openssl
+ bzip2 lzo xz zlib
+ ] ++ optionals stdenv.isLinux [ attr e2fsprogs ];
+
+ configureFlags = [
+ "--disable-birthtime"
+ "--disable-upx"
+ "--disable-dar-static"
+ "--disable-build-html"
+ "--enable-threadar"
+ ];
+
+ postInstall = ''
+ # Disable html help
+ rm -r "$out"/share/dar
+ '';
+
+ enableParallelBuilding = true;
+
+ hardeningDisable = [ "format" ];
+
+ meta = {
+ homepage = "http://dar.linux.free.fr";
+ description = "Disk ARchiver, allows backing up files into indexed archives";
+ maintainers = with maintainers; [ izorkin ];
+ license = licenses.gpl2;
+ platforms = platforms.unix;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/ddar/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/ddar/default.nix
new file mode 100644
index 000000000000..4c8d1a28c27c
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/ddar/default.nix
@@ -0,0 +1,40 @@
+{ lib, python2, fetchFromGitHub, roundup, ncurses }:
+
+python2.pkgs.buildPythonApplication rec {
+ pname = "ddar";
+ version = "1.0";
+
+ src = fetchFromGitHub {
+ owner = "basak";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "158jdy5261k9yw540g48hddy5zyqrr81ir9fjlcy4jnrwfkg7ynm";
+ };
+
+ prePatch = ''
+ substituteInPlace t/local-functions \
+ --replace 'PATH="$ddar_src:$PATH"' 'PATH="$out/bin:$PATH"'
+ # Test requires additional software and compilation of some C programs
+ substituteInPlace t/basic-test.sh \
+ --replace it_stores_and_extracts_corpus0 dont_test
+ '';
+
+ preBuild = ''
+ make -f Makefile.prep synctus/ddar_pb2.py
+ '';
+
+ nativeBuildInputs = with python2.pkgs; [ protobuf.protobuf ];
+ propagatedBuildInputs = with python2.pkgs; [ protobuf ];
+
+ checkInputs = [ roundup ncurses ];
+
+ checkPhase = ''
+ roundup t/basic-test.sh
+ '';
+
+ meta = with lib; {
+ description = "Unix de-duplicating archiver";
+ license = licenses.gpl3;
+ homepage = src.meta.homepage;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/dedup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/dedup/default.nix
new file mode 100644
index 000000000000..db9a05fcfde6
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/dedup/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, lz4, snappy, libsodium
+# For testing
+, coreutils, gawk
+}:
+
+stdenv.mkDerivation rec {
+ pname = "dedup";
+ version = "2.0";
+
+ src = fetchurl {
+ url = "https://dl.2f30.org/releases/${pname}-${version}.tar.gz";
+ sha256 = "0n5kkni4d6blz3s94y0ddyhijb74lxv7msr2mvdmj8l19k0lrfh1";
+ };
+
+ makeFlags = [
+ "CC:=$(CC)"
+ "PREFIX=${placeholder "out"}"
+ "MANPREFIX=${placeholder "out"}/share/man"
+ ];
+
+ buildInputs = [ lz4 snappy libsodium ];
+
+ doCheck = true;
+
+ checkInputs = [ coreutils gawk ];
+ checkTarget = "test";
+
+ meta = with stdenv.lib; {
+ description = "Data deduplication program";
+ homepage = "https://git.2f30.org/dedup/file/README.html";
+ license = with licenses; [ bsd0 isc ];
+ maintainers = with maintainers; [ dtzWill ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/dirvish/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/dirvish/default.nix
new file mode 100644
index 000000000000..9b138d48f213
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/dirvish/default.nix
@@ -0,0 +1,62 @@
+{ fetchurl, stdenv, makeWrapper, perl, perlPackages }:
+
+stdenv.mkDerivation rec {
+ name = "dirvish-1.2.1";
+ src = fetchurl {
+ url = "http://dirvish.org/${name}.tgz";
+ sha256 = "6b7f29c3541448db3d317607bda3eb9bac9fb3c51f970611ffe27e9d63507dcd";
+ };
+
+ nativeBuildInputs = [ makeWrapper ];
+ buildInputs = [ perl ] ++ (with perlPackages; [ GetoptLong TimeParseDate TimePeriod ]);
+
+ executables = [ "dirvish" "dirvish-runall" "dirvish-expire" "dirvish-locate" ];
+ manpages = [ "dirvish.8" "dirvish-runall.8" "dirvish-expire.8" "dirvish-locate.8" "dirvish.conf.5" ];
+
+ buildPhase = ''
+ HEADER="#!${perl}/bin/perl
+
+ \$CONFDIR = \"/etc/dirvish\";
+
+ "
+
+ for executable in $executables; do
+ (
+ echo "$HEADER"
+ cat $executable.pl loadconfig.pl
+ ) > $executable
+ chmod +x $executable
+ done
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp --target-directory=$out/bin $executables
+
+ for manpage in $manpages; do
+ if [[ $manpage =~ \.([[:digit:]]+)$ ]]; then
+ section=''${BASH_REMATCH[1]}
+ mkdir -p $out/man/man$section
+ cp --target-directory=$out/man/man$section $manpage
+ else
+ echo "Couldn't determine man page section by filename"
+ exit 1
+ fi
+ done
+ '';
+
+ postFixup = ''
+ for executable in $executables; do
+ wrapProgram $out/bin/$executable \
+ --set PERL5LIB "$PERL5LIB"
+ done
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Dirvish is a fast, disk based, rotating network backup system";
+ homepage = "http://dirvish.org/";
+ license = stdenv.lib.licenses.osl2;
+ platforms = platforms.linux;
+ maintainers = [ maintainers.winpat ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/diskrsync/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/diskrsync/default.nix
new file mode 100644
index 000000000000..1057eb71dd60
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/diskrsync/default.nix
@@ -0,0 +1,30 @@
+{ buildGoPackage, fetchFromGitHub, stdenv, openssh, makeWrapper }:
+
+buildGoPackage rec {
+ pname = "diskrsync";
+ version = "unstable-2019-01-02";
+
+ src = fetchFromGitHub {
+ owner = "dop251";
+ repo = pname;
+ rev = "e8598ef71038527a8a77d1a6cf2a73cfd96d9139";
+ sha256 = "1dqpmc4hp81knhdk3mrmwdr66xiibsvj5lagbm5ciajg9by45mcs";
+ };
+
+ goPackagePath = "github.com/dop251/diskrsync";
+ goDeps = ./deps.nix;
+
+ buildInputs = [ makeWrapper ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/diskrsync" --argv0 diskrsync --prefix PATH : ${openssh}/bin
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Rsync for block devices and disk images";
+ homepage = "https://github.com/dop251/diskrsync";
+ license = licenses.mit;
+ maintainers = with maintainers; [ jluttine ];
+ };
+
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/diskrsync/deps.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/diskrsync/deps.nix
new file mode 100644
index 000000000000..8045737164b1
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/diskrsync/deps.nix
@@ -0,0 +1,48 @@
+# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
+[
+ {
+ goPackagePath = "github.com/dop251/spgz";
+ fetch = {
+ type = "git";
+ url = "https://github.com/dop251/spgz";
+ rev = "b86304a2b188";
+ sha256 = "1zss1z523qagk99plb0my8m8ng0danl372iyk1pr4i2skp2bf5z7";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/crypto";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/crypto";
+ rev = "9756ffdc2472";
+ sha256 = "0q7hxaaq6lp0v8qqzifvysl47z5rfdlrxkh3d29vsl3wyby3dxl8";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/net";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/net";
+ rev = "eb5bcb51f2a3";
+ sha256 = "17k4g8krxbl84gzcs275b7gsh66dzm15fdxivjnx9xz8q84l4kby";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/sys";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/sys";
+ rev = "97732733099d";
+ sha256 = "118hkp01i4z1f5h6hcjm0ff2ngqhrzj1f7731n0kw8dr6hvbx0sw";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/text";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/text";
+ rev = "v0.3.0";
+ sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
+ };
+ }
+]
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/dump/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/dump/default.nix
new file mode 100644
index 000000000000..38564e109d1c
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/dump/default.nix
@@ -0,0 +1,24 @@
+# Tested with simple dump and restore -i, but complains that
+# /nix/store/.../etc/dumpdates doesn't exist.
+
+{ stdenv, fetchurl, pkgconfig,
+ e2fsprogs, ncurses, readline }:
+
+stdenv.mkDerivation rec {
+ pname = "dump";
+ version = "0.4b46";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/dump/dump-${version}.tar.gz";
+ sha256 = "15rg5y15ak0ppqlhcih78layvg7cwp6hc16p3c58xs8svlkxjqc0";
+ };
+
+ buildInputs = [ e2fsprogs pkgconfig ncurses readline ];
+
+ meta = with stdenv.lib; {
+ homepage = "https://dump.sourceforge.io/";
+ description = "Linux Ext2 filesystem dump/restore utilities";
+ license = licenses.bsd3;
+ maintainers = with maintainers; [ falsifian ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicacy/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicacy/default.nix
new file mode 100644
index 000000000000..b261289f0bf1
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicacy/default.nix
@@ -0,0 +1,32 @@
+{ lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+ pname = "duplicacy";
+ version = "2.3.0";
+
+ goPackagePath = "github.com/gilbertchen/duplicacy";
+
+ src = fetchFromGitHub {
+ owner = "gilbertchen";
+ repo = "duplicacy";
+ rev = "v${version}";
+ sha256 = "12swp3kbwkmwn3g2mp964m60kabmz0ip7kkhvhiqq7k74nxzj312";
+ };
+ goDeps = ./deps.nix;
+ buildPhase = ''
+ cd go/src/${goPackagePath}
+ go build duplicacy/duplicacy_main.go
+ '';
+
+ installPhase = ''
+ install -D duplicacy_main $out/bin/duplicacy
+ '';
+
+ meta = with lib; {
+ homepage = "https://duplicacy.com";
+ description = "A new generation cloud backup tool";
+ platforms = platforms.linux ++ platforms.darwin;
+ license = lib.licenses.unfree;
+ maintainers = with maintainers; [ ffinkdevs ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicacy/deps.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicacy/deps.nix
new file mode 100644
index 000000000000..12d30b53b6c5
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicacy/deps.nix
@@ -0,0 +1,336 @@
+# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
+[
+ {
+ goPackagePath = "cloud.google.com/go";
+ fetch = {
+ type = "git";
+ url = "https://code.googlesource.com/gocloud";
+ rev = "2d3a6656c17a60b0815b7e06ab0be04eacb6e613";
+ sha256 = "0fi3qj9fvc4bxbrwa1m5sxsb8yhvawiwigaddvmmizjykxbq5csq";
+ };
+ }
+ {
+ goPackagePath = "github.com/Azure/azure-sdk-for-go";
+ fetch = {
+ type = "git";
+ url = "https://github.com/Azure/azure-sdk-for-go";
+ rev = "b7fadebe0e7f5c5720986080a01495bd8d27be37";
+ sha256 = "11zcmd17206byxhgz2a75qascilydlzjbz73l2mrqng3yyr20yk1";
+ };
+ }
+ {
+ goPackagePath = "github.com/Azure/go-autorest";
+ fetch = {
+ type = "git";
+ url = "https://github.com/Azure/go-autorest";
+ rev = "0ae36a9e544696de46fdadb7b0d5fb38af48c063";
+ sha256 = "0f2qcv24l9bx3jys2m9ycyy77vqlx7dbfa3frxlk19wnrwiv3p6g";
+ };
+ }
+ {
+ goPackagePath = "github.com/aryann/difflib";
+ fetch = {
+ type = "git";
+ url = "https://github.com/aryann/difflib";
+ rev = "e206f873d14a916d3d26c40ab667bca123f365a3";
+ sha256 = "00zb9sx6l6b2zq614x45zlyshl20zjhwfj8r5krw4f9y0mx3n2dm";
+ };
+ }
+ {
+ goPackagePath = "github.com/aws/aws-sdk-go";
+ fetch = {
+ type = "git";
+ url = "https://github.com/aws/aws-sdk-go";
+ rev = "a32b1dcd091264b5dee7b386149b6cc3823395c9";
+ sha256 = "1yicb7l6m4hs3mi724hz74wn8305qvx6g73mjqafaaqvh6dyn86m";
+ };
+ }
+ {
+ goPackagePath = "github.com/bkaradzic/go-lz4";
+ fetch = {
+ type = "git";
+ url = "https://github.com/bkaradzic/go-lz4";
+ rev = "74ddf82598bc4745b965729e9c6a463bedd33049";
+ sha256 = "1vdid8v0c2v2qhrg9rzn3l7ya1h34jirrxfnir7gv7w6s4ivdvc1";
+ };
+ }
+ {
+ goPackagePath = "github.com/dgrijalva/jwt-go";
+ fetch = {
+ type = "git";
+ url = "https://github.com/dgrijalva/jwt-go";
+ rev = "dbeaa9332f19a944acb5736b4456cfcc02140e29";
+ sha256 = "0zk6l6kzsjdijfn7c4h0aywdjx5j2hjwi67vy1k6wr46hc8ks2hs";
+ };
+ }
+ {
+ goPackagePath = "github.com/gilbertchen/azure-sdk-for-go";
+ fetch = {
+ type = "git";
+ url = "https://github.com/gilbertchen/azure-sdk-for-go";
+ rev = "bbf89bd4d716c184f158d1e1428c2dbef4a18307";
+ sha256 = "14563izc2y05k8s20fmhanvjydbcq8k5adp4cgw91d9bs52qivx7";
+ };
+ }
+ {
+ goPackagePath = "github.com/gilbertchen/cli";
+ fetch = {
+ type = "git";
+ url = "https://github.com/gilbertchen/cli";
+ rev = "1de0a1836ce9c3ae1bf737a0869c4f04f28a7f98";
+ sha256 = "00vbyjsn009cqg24sxcizq10rgicnmrv0f8jg3fa1fw6yp5gqdl5";
+ };
+ }
+ {
+ goPackagePath = "github.com/gilbertchen/go-dropbox";
+ fetch = {
+ type = "git";
+ url = "https://github.com/gilbertchen/go-dropbox";
+ rev = "90711b603312b1f973f3a5da3793ac4f1e5c2f2a";
+ sha256 = "0y2ydl3mjbkfbqyygrwq7vqig9hjh7cxvzsn2gxc1851haqp4h19";
+ };
+ }
+ {
+ goPackagePath = "github.com/gilbertchen/go-ole";
+ fetch = {
+ type = "git";
+ url = "https://github.com/gilbertchen/go-ole";
+ rev = "0e87ea779d9deb219633b828a023b32e1244dd57";
+ sha256 = "1d937b4i9mrwfgs1s17qhbd78dcd97wwm8zsajkarky8d55rz1bw";
+ };
+ }
+ {
+ goPackagePath = "github.com/gilbertchen/go.dbus";
+ fetch = {
+ type = "git";
+ url = "https://github.com/gilbertchen/go.dbus";
+ rev = "8591994fa32f1dbe3fa9486bc6f4d4361ac16649";
+ sha256 = "0wg82hwgk4s65ns76x7cby6dfdxsdkc4jyqn9zd7g037fhzh8rk5";
+ };
+ }
+ {
+ goPackagePath = "github.com/gilbertchen/goamz";
+ fetch = {
+ type = "git";
+ url = "https://github.com/gilbertchen/goamz";
+ rev = "eada9f4e8cc2a45db775dee08a2c37597ce4760a";
+ sha256 = "0v6i4jdly06wixmm58ygxh284hnlbfxczvcwxvywiyy9bp5qyaid";
+ };
+ }
+ {
+ goPackagePath = "github.com/gilbertchen/gopass";
+ fetch = {
+ type = "git";
+ url = "https://github.com/gilbertchen/gopass";
+ rev = "bf9dde6d0d2c004a008c27aaee91170c786f6db8";
+ sha256 = "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45";
+ };
+ }
+ {
+ goPackagePath = "github.com/gilbertchen/keyring";
+ fetch = {
+ type = "git";
+ url = "https://github.com/gilbertchen/keyring";
+ rev = "8855f5632086e51468cd7ce91056f8da69687ef6";
+ sha256 = "1ja623dqnhkr1cvynrcai10s8kn2aiq53cvd8yxr47bb8i2a2q1m";
+ };
+ }
+ {
+ goPackagePath = "github.com/gilbertchen/xattr";
+ fetch = {
+ type = "git";
+ url = "https://github.com/gilbertchen/xattr";
+ rev = "68e7a6806b0137a396d7d05601d7403ae1abac58";
+ sha256 = "120lq8vasc5yh0ajczsdpi8cfzgi4ymrnphgqdfcar3b9rsvx80b";
+ };
+ }
+ {
+ goPackagePath = "github.com/go-ini/ini";
+ fetch = {
+ type = "git";
+ url = "https://github.com/go-ini/ini";
+ rev = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a";
+ sha256 = "0mhgxw5q6b0pryhikx3k4wby7g32rwjjljzihi47lwn34kw5y1qn";
+ };
+ }
+ {
+ goPackagePath = "github.com/golang/protobuf";
+ fetch = {
+ type = "git";
+ url = "https://github.com/golang/protobuf";
+ rev = "1e59b77b52bf8e4b449a57e6f79f21226d571845";
+ sha256 = "19bkh81wnp6njg3931wky6hsnnl2d1ig20vfjxpv450sd3k6yys8";
+ };
+ }
+ {
+ goPackagePath = "github.com/googleapis/gax-go";
+ fetch = {
+ type = "git";
+ url = "https://github.com/googleapis/gax-go";
+ rev = "317e0006254c44a0ac427cc52a0e083ff0b9622f";
+ sha256 = "0h92x579vbrv2fka8q2ddy1kq6a63qbqa8zc09ygl6skzn9gw1dh";
+ };
+ }
+ {
+ goPackagePath = "github.com/jmespath/go-jmespath";
+ fetch = {
+ type = "git";
+ url = "https://github.com/jmespath/go-jmespath";
+ rev = "0b12d6b5";
+ sha256 = "1vv6hph8j6xgv7gwl9vvhlsaaqsm22sxxqmgmldi4v11783pc1ld";
+ };
+ }
+ {
+ goPackagePath = "github.com/kr/fs";
+ fetch = {
+ type = "git";
+ url = "https://github.com/kr/fs";
+ rev = "2788f0dbd16903de03cb8186e5c7d97b69ad387b";
+ sha256 = "1c0fipl4rsh0v5liq1ska1dl83v3llab4k6lm8mvrx9c4dyp71ly";
+ };
+ }
+ {
+ goPackagePath = "github.com/marstr/guid";
+ fetch = {
+ type = "git";
+ url = "https://github.com/marstr/guid";
+ rev = "8bd9a64bf37eb297b492a4101fb28e80ac0b290f";
+ sha256 = "081qrar6wwpmb2pq3swv4byh73r9riyhl2dwv0902d8jg3kwricm";
+ };
+ }
+ {
+ goPackagePath = "github.com/minio/blake2b-simd";
+ fetch = {
+ type = "git";
+ url = "https://github.com/minio/blake2b-simd";
+ rev = "3f5f724cb5b182a5c278d6d3d55b40e7f8c2efb4";
+ sha256 = "0b6jbnj62c0gmmfd4zdmh8xbg01p80f13yygir9xprqkzk6fikmd";
+ };
+ }
+ {
+ goPackagePath = "github.com/ncw/swift";
+ fetch = {
+ type = "git";
+ url = "https://github.com/ncw/swift";
+ rev = "ae9f0ea1605b9aa6434ed5c731ca35d83ba67c55";
+ sha256 = "0a0iwynhgxsl3czabl7ajnxpyw6x0dzbiqz6il8aw7kn10ld1rvl";
+ };
+ }
+ {
+ goPackagePath = "github.com/pkg/errors";
+ fetch = {
+ type = "git";
+ url = "https://github.com/pkg/errors";
+ rev = "645ef00459ed84a119197bfb8d8205042c6df63d";
+ sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
+ };
+ }
+ {
+ goPackagePath = "github.com/pkg/sftp";
+ fetch = {
+ type = "git";
+ url = "https://github.com/pkg/sftp";
+ rev = "3edd153f213d8d4191a0ee4577c61cca19436632";
+ sha256 = "0iw6lijdljwh5xw5hsy0b578cr52h6vvm7hbnzlrvciwhh4sfhhp";
+ };
+ }
+ {
+ goPackagePath = "github.com/satori/go.uuid";
+ fetch = {
+ type = "git";
+ url = "https://github.com/satori/go.uuid";
+ rev = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3";
+ sha256 = "1j4s5pfg2ldm35y8ls8jah4dya2grfnx2drb4jcbjsyrp4cm5yfb";
+ };
+ }
+ {
+ goPackagePath = "github.com/vaughan0/go-ini";
+ fetch = {
+ type = "git";
+ url = "https://github.com/vaughan0/go-ini";
+ rev = "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1";
+ sha256 = "1l1isi3czis009d9k5awsj4xdxgbxn4n9yqjc1ac7f724x6jacfa";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/crypto";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/crypto";
+ rev = "9f005a07e0d31d45e6656d241bb5c0f2efd4bc94";
+ sha256 = "1mhmr6ljzl3iafsz4qy8vval7rmr828wh59dlqqqjqx6sqmcs1dv";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/net";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/net";
+ rev = "9dfe39835686865bff950a07b394c12a98ddc811";
+ sha256 = "0z8mnl4mi88syafrgqys2ak2gg3yrbna25hpz88y3anl8x4jhg1a";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/oauth2";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/oauth2";
+ rev = "f95fa95eaa936d9d87489b15d1d18b97c1ba9c28";
+ sha256 = "0p9kis69wvhv8a2qbcjxvn9ggpdh81cbfjpq5pjga7n8k6d065fh";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/sys";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/sys";
+ rev = "82aafbf43bf885069dc71b7e7c2f9d7a614d47da";
+ sha256 = "1jvngpvy0q40f7krkgmwf5bbjzhv449297awcr0y78kzn0cyawi2";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/text";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/text";
+ rev = "88f656faf3f37f690df1a32515b479415e1a6769";
+ sha256 = "0zakmgg6dlwnkhignwjajn0dckzqq18zxvnmmg0fq6455x7fs673";
+ };
+ }
+ {
+ goPackagePath = "google.golang.org/api";
+ fetch = {
+ type = "git";
+ url = "https://code.googlesource.com/google-api-go-client";
+ rev = "17b5f22a248d6d3913171c1a557552ace0d9c806";
+ sha256 = "0gs78qsxfg89kpiiray1x9jiv6bh328jmjkwd3ghnygf3l98kc8c";
+ };
+ }
+ {
+ goPackagePath = "google.golang.org/appengine";
+ fetch = {
+ type = "git";
+ url = "https://github.com/golang/appengine";
+ rev = "150dc57a1b433e64154302bdc40b6bb8aefa313a";
+ sha256 = "0w3knznv39k8bm85ri62f83czcrxknql7dv6p9hk1a5jx3xljgxq";
+ };
+ }
+ {
+ goPackagePath = "google.golang.org/genproto";
+ fetch = {
+ type = "git";
+ url = "https://github.com/google/go-genproto";
+ rev = "891aceb7c239e72692819142dfca057bdcbfcb96";
+ sha256 = "1axim84fqzsp6iialk6zl4fsbfpx658vssc6ccakn4yy1xc9h854";
+ };
+ }
+ {
+ goPackagePath = "google.golang.org/grpc";
+ fetch = {
+ type = "git";
+ url = "https://github.com/grpc/grpc-go";
+ rev = "5a9f7b402fe85096d2e1d0383435ee1876e863d0";
+ sha256 = "1hlirgvmzb929jpb1dvh930646ih5ffg3b6pmlilqr7ffdkl5z3j";
+ };
+ }
+] \ No newline at end of file
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicati/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicati/default.nix
new file mode 100644
index 000000000000..63f35538796a
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicati/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchzip, mono, sqlite, makeWrapper }:
+
+stdenv.mkDerivation rec {
+ pname = "duplicati";
+ version = "2.0.5.1";
+ channel = "beta";
+ build_date = "2020-01-18";
+
+ src = fetchzip {
+ url = "https://github.com/duplicati/duplicati/releases/download/v${version}-${version}_${channel}_${build_date}/duplicati-${version}_${channel}_${build_date}.zip";
+ sha256 = "1k3gfwcw7snxkqn4lf9rx1vzradpyq5vc48pwvaa8wwqnlykiimw";
+ stripRoot = false;
+ };
+
+ buildInputs = [ makeWrapper ];
+
+ installPhase = ''
+ mkdir -p $out/{bin,share/${pname}-${version}}
+ cp -r * $out/share/${pname}-${version}
+ makeWrapper "${mono}/bin/mono" $out/bin/duplicati-cli \
+ --add-flags "$out/share/${pname}-${version}/Duplicati.CommandLine.exe" \
+ --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [
+ sqlite ]}
+ makeWrapper "${mono}/bin/mono" $out/bin/duplicati-server \
+ --add-flags "$out/share/${pname}-${version}/Duplicati.Server.exe" \
+ --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [
+ sqlite ]}
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A free backup client that securely stores encrypted, incremental, compressed backups on cloud storage services and remote file servers";
+ homepage = "https://www.duplicati.com/";
+ license = licenses.lgpl21;
+ maintainers = with maintainers; [ nyanloutre ];
+ platforms = platforms.all;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/default.nix
new file mode 100644
index 000000000000..c12cc1198c9c
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/default.nix
@@ -0,0 +1,121 @@
+{ stdenv
+, fetchpatch
+, fetchurl
+, pythonPackages
+, librsync
+, ncftp
+, gnupg
+, gnutar
+, par2cmdline
+, utillinux
+, rsync
+, backblaze-b2
+, makeWrapper
+, gettext
+}:
+let
+ inherit (stdenv.lib.versions) majorMinor splitVersion;
+ majorMinorPatch = v: builtins.concatStringsSep "." (stdenv.lib.take 3 (splitVersion v));
+in
+pythonPackages.buildPythonApplication rec {
+ pname = "duplicity";
+ version = "0.8.13";
+
+ src = fetchurl {
+ url = "https://code.launchpad.net/duplicity/${majorMinor version}-series/${majorMinorPatch version}/+download/duplicity-${version}.tar.gz";
+ sha256 = "0lflg1ay4q4w9qzpmh6y2hza4fc3ig12q44qkd80ks17hj21bxa6";
+ };
+
+ patches = [
+ # We use the tar binary on all platforms.
+ ./gnutar-in-test.patch
+
+ # Our Python infrastructure runs test in installCheckPhase so we need
+ # to make the testing code stop assuming it is run from the source directory.
+ ./use-installed-scripts-in-test.patch
+ ] ++ stdenv.lib.optionals stdenv.isLinux [
+ ./linux-disable-timezone-test.patch
+ ];
+
+ nativeBuildInputs = [
+ makeWrapper
+ gettext
+ pythonPackages.wrapPython
+ ];
+ buildInputs = [
+ librsync
+ ];
+
+ propagatedBuildInputs = with pythonPackages; [
+ b2sdk
+ boto
+ cffi
+ cryptography
+ ecdsa
+ idna
+ pygobject3
+ fasteners
+ ipaddress
+ lockfile
+ paramiko
+ pyasn1
+ pycrypto
+ pydrive
+ future
+ ] ++ stdenv.lib.optionals (!isPy3k) [
+ enum
+ ];
+
+ checkInputs = [
+ gnupg # Add 'gpg' to PATH.
+ gnutar # Add 'tar' to PATH.
+ librsync # Add 'rdiff' to PATH.
+ par2cmdline # Add 'par2' to PATH.
+ ] ++ stdenv.lib.optionals stdenv.isLinux [
+ utillinux # Add 'setsid' to PATH.
+ ] ++ (with pythonPackages; [
+ lockfile
+ mock
+ pexpect
+ pytest
+ pytestrunner
+ ]);
+
+ postInstall = ''
+ wrapProgram $out/bin/duplicity \
+ --prefix PATH : "${stdenv.lib.makeBinPath [ gnupg ncftp rsync ]}"
+ '';
+
+ preCheck = ''
+ wrapPythonProgramsIn "$PWD/testing/overrides/bin" "$pythonPath"
+
+ # Add 'duplicity' to PATH for tests.
+ # Normally, 'setup.py test' adds 'build/scripts-2.7/' to PATH before running
+ # tests. However, 'build/scripts-2.7/duplicity' is not wrapped, so its
+ # shebang is incorrect and it fails to run inside Nix' sandbox.
+ # In combination with use-installed-scripts-in-test.patch, make 'setup.py
+ # test' use the installed 'duplicity' instead.
+ PATH="$out/bin:$PATH"
+
+ # Don't run developer-only checks (pep8, etc.).
+ export RUN_CODE_TESTS=0
+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
+ # Work around the following error when running tests:
+ # > Max open files of 256 is too low, should be >= 1024.
+ # > Use 'ulimit -n 1024' or higher to correct.
+ ulimit -n 1024
+ '';
+
+ # TODO: Fix test failures on macOS 10.13:
+ #
+ # > OSError: out of pty devices
+ doCheck = !stdenv.isDarwin;
+
+ meta = with stdenv.lib; {
+ description = "Encrypted bandwidth-efficient backup using the rsync algorithm";
+ homepage = "https://www.nongnu.org/duplicity";
+ license = licenses.gpl2Plus;
+ maintainers = with maintainers; [ peti ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/gnutar-in-test.patch b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/gnutar-in-test.patch
new file mode 100644
index 000000000000..694fc8819509
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/gnutar-in-test.patch
@@ -0,0 +1,18 @@
+--- a/testing/functional/test_restart.py
++++ b/testing/functional/test_restart.py
+@@ -323,14 +323,7 @@ class RestartTestWithoutEncryption(RestartTest):
+ https://launchpad.net/bugs/929067
+ """
+
+- if platform.system().startswith(u'Linux'):
+- tarcmd = u"tar"
+- elif platform.system().startswith(u'Darwin'):
+- tarcmd = u"gtar"
+- elif platform.system().endswith(u'BSD'):
+- tarcmd = u"gtar"
+- else:
+- raise Exception(u"Platform %s not supported by tar/gtar." % platform.platform())
++ tarcmd = u"tar"
+
+ # Intial normal backup
+ self.backup("full", "testfiles/blocktartest")
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/linux-disable-timezone-test.patch b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/linux-disable-timezone-test.patch
new file mode 100644
index 000000000000..b5e6df18a15b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/linux-disable-timezone-test.patch
@@ -0,0 +1,10 @@
+--- a/testing/unit/test_statistics.py
++++ b/testing/unit/test_statistics.py
+@@ -59,6 +59,7 @@ class StatsObjTest(UnitTestCase):
+ s1 = StatsDeltaProcess()
+ assert s1.get_stat('SourceFiles') == 0
+
++ @unittest.skip("Broken on Linux in Nix' build environment")
+ def test_get_stats_string(self):
+ """Test conversion of stat object into string"""
+ s = StatsObj()
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch
new file mode 100644
index 000000000000..a3ba14229159
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch
@@ -0,0 +1,49 @@
+--- a/setup.py
++++ b/setup.py
+@@ -92,10 +92,6 @@ class TestCommand(test):
+ except Exception:
+ pass
+
+- os.environ[u'PATH'] = u"%s:%s" % (
+- os.path.abspath(build_scripts_cmd.build_dir),
+- os.environ.get(u'PATH'))
+-
+ test.run(self)
+
+ def run_tests(self):
+--- a/testing/functional/__init__.py
++++ b/testing/functional/__init__.py
+@@ -107,7 +107,7 @@ class FunctionalTestCase(DuplicityTestCase):
+ if basepython is not None:
+ cmd_list.extend([basepython])
+ cmd_list.extend([u"-m", u"coverage", u"run", u"--source=duplicity", u"-p"])
+- cmd_list.extend([u"../bin/duplicity"])
++ cmd_list.extend([u"duplicity"])
+ cmd_list.extend(options)
+ cmd_list.extend([u"-v0"])
+ cmd_list.extend([u"--no-print-statistics"])
+--- a/testing/functional/test_log.py
++++ b/testing/functional/test_log.py
+@@ -47,9 +47,9 @@ class LogTest(FunctionalTestCase):
+ # Run actual duplicity command (will fail, because no arguments passed)
+ basepython = os.environ.get(u'TOXPYTHON', None)
+ if basepython is not None:
+- os.system(u"{} ../bin/duplicity --log-file={} >/dev/null 2>&1".format(basepython, self.logfile))
++ os.system(u"{} duplicity --log-file={} >/dev/null 2>&1".format(basepython, self.logfile))
+ else:
+- os.system(u"../bin/duplicity --log-file={} >/dev/null 2>&1".format(self.logfile))
++ os.system(u"duplicity --log-file={} >/dev/null 2>&1".format(self.logfile))
+
+ # The format of the file should be:
+ # """ERROR 2
+--- a/testing/functional/test_rdiffdir.py
++++ b/testing/functional/test_rdiffdir.py
+@@ -38,7 +38,7 @@ class RdiffdirTest(FunctionalTestCase):
+
+ def run_rdiffdir(self, argstring):
+ u"""Run rdiffdir with given arguments"""
+- self.run_cmd(u"../bin/rdiffdir " + argstring)
++ self.run_cmd(u"rdiffdir " + argstring)
+
+ def run_cycle(self, dirname_list):
+ u"""Run diff/patch cycle on directories in dirname_list"""
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/duply/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/duply/default.nix
new file mode 100644
index 000000000000..7808a0925b15
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/duply/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, coreutils, python2, duplicity, gawk, gnupg, bash
+, gnugrep, txt2man, makeWrapper, which
+}:
+
+stdenv.mkDerivation rec {
+ pname = "duply";
+ version = "2.2";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/project/ftplicity/duply%20%28simple%20duplicity%29/2.2.x/duply_${version}.tgz";
+ sha256 = "1bd7ivswxmxg64n0fnwgz6bkgckhdhz2qnnlkqqx4ccdxx15krbr";
+ };
+
+ buildInputs = [ txt2man makeWrapper ];
+
+ postPatch = "patchShebangs .";
+
+ installPhase = ''
+ mkdir -p "$out/bin"
+ mkdir -p "$out/share/man/man1"
+ install -vD duply "$out/bin"
+ wrapProgram "$out/bin/duply" --set PATH \
+ ${stdenv.lib.makeBinPath [ coreutils python2 duplicity gawk gnupg bash gnugrep txt2man which ]}
+ "$out/bin/duply" txt2man > "$out/share/man/man1/duply.1"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Shell front end for the duplicity backup tool";
+ longDescription = ''
+ Duply is a shell front end for the duplicity backup tool
+ https://www.nongnu.org/duplicity. It greatly simplifies its usage by
+ implementing backup job profiles, batch commands and more. Who says
+ secure backups on non-trusted spaces are no child's play?
+ '';
+ homepage = "https://duply.net/";
+ license = licenses.gpl2;
+ maintainers = [ maintainers.bjornfor ];
+ platforms = stdenv.lib.platforms.unix;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/easysnap/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/easysnap/default.nix
new file mode 100644
index 000000000000..5c2ad1a50a7b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/easysnap/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchFromGitHub, zfs }:
+
+stdenv.mkDerivation {
+ pname = "easysnap";
+ version = "unstable-2020-04-04";
+
+ src = fetchFromGitHub {
+ owner = "sjau";
+ repo = "easysnap";
+ rev = "26f89c0c3cda01e2595ee19ae5fb8518da25b4ef";
+ sha256 = "1k49k1m7y8s099wyiiz8411i77j1156ncirynmjfyvdhmhcyp5rw";
+ };
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp -n easysnap* $out/bin/
+
+ for i in $out/bin/*; do
+ substituteInPlace $i \
+ --replace zfs ${zfs}/bin/zfs
+ done
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://github.com/sjau/easysnap";
+ description = "Customizable ZFS Snapshotting tool with zfs send/recv pulling";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ sjau ];
+ };
+
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/flockit/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/flockit/default.nix
new file mode 100644
index 000000000000..53baa6a6d934
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/flockit/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchFromGitHub, runtimeShell }:
+
+stdenv.mkDerivation {
+ pname = "flockit";
+ version = "2012-08-11";
+
+ src = fetchFromGitHub {
+ owner = "smerritt";
+ repo = "flockit";
+ rev = "5c2b2092f8edcc8e3e2eb6ef66c968675dbfa686";
+ sha256 = "0vajck9q2677gpn9a4flkyz7mw69ql1647cjwqh834nrcr2b5164";
+ };
+
+ installPhase = ''
+ mkdir -p $out/lib $out/bin
+ cp ./libflockit.so $out/lib
+
+ (cat <<EOI
+ #!${runtimeShell}
+ env LD_PRELOAD="$out/lib/libflockit.so" FLOCKIT_FILE_PREFIX=\$1 \''${@:2}
+ EOI
+ ) > $out/bin/flockit
+ chmod +x $out/bin/flockit
+ '';
+
+ meta = with stdenv.lib; {
+ description = "LD_PRELOAD shim to add file locking to programs that don't do it (I'm looking at you, rsync!)";
+ longDescription = ''
+ This library and tool exists solely because rsync doesn't have file locking.
+
+ It's not used like a normal library; you don't link against it, and you
+ don't have to patch your source code to use it. It's inserted between your
+ program and its libraries by use of LD_PRELOAD.
+
+ For example:
+
+ $ env LD_PRELOAD=$(nix-build -A pkgs.flockit)/lib/libflockit.so FLOCKIT_FILE_PREFIX=test rsync SRC DEST
+
+ Besides the library a handy executable is provided which can simplify the above to:
+
+ $ $(nix-build -A pkgs.flockit)/bin/flockit test rsync SRC DEST
+
+ Also see the following blog post:
+ https://www.swiftstack.com/blog/2012/08/15/old-school-monkeypatching/
+ '';
+ homepage = "https://github.com/smerritt/flockit";
+ license = licenses.asl20;
+ platforms = platforms.linux;
+ maintainers = [ maintainers.basvandijk ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/grab-site/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/grab-site/default.nix
new file mode 100644
index 000000000000..e69823ab45d6
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/grab-site/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, python37, fetchFromGitHub }:
+
+let
+ python = python37.override {
+ self = python;
+ packageOverrides = self: super: {
+ tornado = super.tornado_4;
+ };
+ };
+
+in with python.pkgs; buildPythonApplication rec {
+ version = "2.1.19";
+ name = "grab-site-${version}";
+
+ src = fetchFromGitHub {
+ rev = version;
+ owner = "ArchiveTeam";
+ repo = "grab-site";
+ sha256 = "1v1hnhv5knzdl0kj3574ccwlh171vcb7faddp095ycdmiiybalk4";
+ };
+
+ propagatedBuildInputs = [
+ click ludios_wpull manhole lmdb autobahn fb-re2 websockets cchardet
+ ];
+
+ checkPhase = ''
+ export PATH=$PATH:$out/bin
+ bash ./tests/offline-tests
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Crawler for web archiving with WARC output";
+ homepage = "https://github.com/ArchiveTeam/grab-site";
+ license = licenses.mit;
+ maintainers = with maintainers; [ ivan ];
+ platforms = platforms.all;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/hpe-ltfs/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/hpe-ltfs/default.nix
new file mode 100644
index 000000000000..e34155bb2389
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/hpe-ltfs/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, fuse, icu, pkgconfig, libxml2, libuuid }:
+
+stdenv.mkDerivation rec {
+ version = "3.4.2_Z7550-02501";
+ pname = "hpe-ltfs";
+
+ src = fetchFromGitHub {
+ rev = version;
+ owner = "nix-community";
+ repo = "hpe-ltfs";
+ sha256 = "193593hsc8nf5dn1fkxhzs1z4fpjh64hdkc8q6n9fgplrpxdlr4s";
+ };
+
+ sourceRoot = "source/ltfs";
+
+ nativeBuildInputs = [ pkgconfig ];
+
+ buildInputs = [
+ fuse icu libxml2 libuuid
+ ];
+
+ meta = with stdenv.lib; {
+ description = "HPE's implementation of the open-source tape filesystem standard ltfs";
+ homepage = "https://support.hpe.com/hpesc/public/km/product/1009214665/Product";
+ license = licenses.lgpl21;
+ maintainers = [ maintainers.redvers ];
+ platforms = platforms.linux;
+ downloadPage = "https://github.com/nix-community/hpe-ltfs";
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/httrack/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/httrack/default.nix
new file mode 100644
index 000000000000..9a77153e2ff3
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/httrack/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, zlib, openssl, libiconv }:
+
+stdenv.mkDerivation rec {
+ version = "3.49.2";
+ pname = "httrack";
+
+ src = fetchurl {
+ url = "https://mirror.httrack.com/httrack-${version}.tar.gz";
+ sha256 = "09a0gm67nml86qby1k1gh7rdxamnrnzwr6l9r5iiq94favjs0xrl";
+ };
+
+ buildInputs = [ zlib openssl ] ++ stdenv.lib.optional stdenv.isDarwin libiconv;
+
+ enableParallelBuilding = true;
+
+ meta = with stdenv.lib; {
+ description = "Easy-to-use offline browser / website mirroring utility";
+ homepage = "http://www.httrack.com";
+ license = licenses.gpl3;
+ platforms = with platforms; unix;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/httrack/qt.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/httrack/qt.nix
new file mode 100644
index 000000000000..6ee7f6e6a210
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/httrack/qt.nix
@@ -0,0 +1,40 @@
+{ mkDerivation, stdenv, fetchurl, cmake, pkgconfig, makeWrapper
+, httrack, qtbase, qtmultimedia }:
+
+mkDerivation rec {
+ pname = "httraqt";
+ version = "1.4.9";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/httraqt/${pname}-${version}.tar.gz";
+ sha256 = "0pjxqnqchpbla4xiq4rklc06484n46cpahnjy03n9rghwwcad25b";
+ };
+
+ buildInputs = [ httrack qtbase qtmultimedia ];
+
+ nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
+
+ enableParallelBuilding = true;
+
+ prePatch = ''
+ substituteInPlace cmake/HTTRAQTFindHttrack.cmake \
+ --replace /usr/include/httrack/ ${httrack}/include/httrack/
+
+ substituteInPlace distribution/posix/CMakeLists.txt \
+ --replace /usr/share $out/share
+
+ substituteInPlace desktop/httraqt.desktop \
+ --replace Exec=httraqt Exec=$out/bin/httraqt
+
+ substituteInPlace sources/main/httraqt.cpp \
+ --replace /usr/share/httraqt/ $out/share/httraqt
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Easy-to-use offline browser / website mirroring utility - QT frontend";
+ homepage = "http://www.httrack.com";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ peterhoeg ];
+ platforms = with platforms; unix;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/iceshelf/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/iceshelf/default.nix
new file mode 100644
index 000000000000..546339ca002a
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/iceshelf/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchFromGitHub, git, awscli, python3 }:
+
+python3.pkgs.buildPythonApplication rec {
+ pname = "iceshelf";
+ version = "unstable-2019-07-03";
+
+ format = "other";
+
+ src = fetchFromGitHub {
+ owner = "mrworf";
+ repo = pname;
+ rev = "26768dde3fc54fa412e523eb8f8552e866b4853b";
+ sha256 = "08rcbd14vn7312rmk2hyvdzvhibri31c4r5lzdrwb1n1y9q761qm";
+ };
+
+ propagatedBuildInputs = [
+ git
+ awscli
+ python3.pkgs.python-gnupg
+ ];
+
+ installPhase = ''
+ mkdir -p $out/bin $out/share/doc/${pname} $out/${python3.sitePackages}
+ cp -v iceshelf iceshelf-restore $out/bin
+ cp -v iceshelf.sample.conf $out/share/doc/${pname}/
+ cp -rv modules $out/${python3.sitePackages}
+ '';
+
+ meta = with lib; {
+ description = "A simple tool to allow storage of signed, encrypted, incremental backups using Amazon's Glacier storage";
+ license = licenses.lgpl2;
+ homepage = "https://github.com/mrworf/iceshelf";
+ maintainers = with maintainers; [ mmahut ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/kopia/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/kopia/default.nix
new file mode 100644
index 000000000000..056f523a2ca8
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/kopia/default.nix
@@ -0,0 +1,43 @@
+{ lib, buildGoModule, fetchFromGitHub, coreutils }:
+
+buildGoModule rec {
+ pname = "kopia";
+ version = "0.7.3";
+
+ src = fetchFromGitHub {
+ owner = pname;
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "1dnk764y71c9k9nghn9q06f2zz9igsvm4z826azil2d58h5d06j6";
+ };
+
+ vendorSha256 = "1mnhq6kn0pn67l55a9k6irmjlprr295218nms3klsk2720syzdwq";
+
+ doCheck = false;
+
+ subPackages = [ "." ];
+
+ buildFlagsArray = ''
+ -ldflags=
+ -X github.com/kopia/kopia/repo.BuildVersion=${version}
+ -X github.com/kopia/kopia/repo.BuildInfo=${src.rev}
+ '';
+
+ postConfigure = ''
+ # make 'vendor' writable
+ cp -L -r vendor tmp-vendor
+ rm -rf vendor
+ mv tmp-vendor vendor
+
+ # speakeasy hardcodes /bin/stty https://github.com/bgentry/speakeasy/issues/22
+ substituteInPlace vendor/github.com/bgentry/speakeasy/speakeasy_unix.go \
+ --replace "/bin/stty" "${coreutils}/bin/stty"
+ '';
+
+ meta = with lib; {
+ homepage = "https://kopia.io";
+ description = "Cross-platform backup tool with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication";
+ license = licenses.asl20;
+ maintainers = [ maintainers.bbigras ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/luckybackup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/luckybackup/default.nix
new file mode 100644
index 000000000000..7203ba480e60
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/luckybackup/default.nix
@@ -0,0 +1,45 @@
+{ mkDerivation, stdenv, fetchurl
+, pkgconfig, libtool, qmake
+, rsync, ssh
+}:
+
+with stdenv.lib;
+mkDerivation rec {
+ pname = "luckybackup";
+ version = "0.5.0";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/project/luckybackup/${version}/source/${pname}-${version}.tar.gz";
+ sha256 = "0nwjsk1j33pm8882jbj8h6nxn6n5ab9dxqpqkay65pfbhcjay0g8";
+ };
+
+ buildInputs = [ rsync ssh ];
+
+ nativeBuildInputs = [ pkgconfig libtool qmake ];
+
+ prePatch = ''
+ for File in luckybackup.pro menu/luckybackup-pkexec \
+ menu/luckybackup-su.desktop menu/luckybackup.desktop \
+ menu/net.luckybackup.su.policy src/functions.cpp \
+ src/global.cpp src/scheduleDialog.cpp; do
+ substituteInPlace $File --replace "/usr" "$out"
+ done
+ '';
+
+ meta = {
+ description = "A powerful, fast and reliable backup & sync tool";
+ longDescription = ''
+ luckyBackup is an application for data back-up and synchronization
+ powered by the rsync tool.
+
+ It is simple to use, fast (transfers over only changes made and not
+ all data), safe (keeps your data safe by checking all declared directories
+ before proceeding in any data manipulation), reliable and fully
+ customizable.
+ '';
+ homepage = "http://luckybackup.sourceforge.net/";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ AndersonTorres ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/Gemfile b/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/Gemfile
new file mode 100644
index 000000000000..a87462e2b8a2
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/Gemfile
@@ -0,0 +1,2 @@
+source 'https://rubygems.org/'
+gem 'lvmsync'
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/Gemfile.lock b/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/Gemfile.lock
new file mode 100644
index 000000000000..5faac2356799
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/Gemfile.lock
@@ -0,0 +1,19 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ git-version-bump (0.15.1)
+ lvmsync (3.3.2)
+ git-version-bump (~> 0.10)
+ treetop
+ polyglot (0.3.5)
+ treetop (1.6.9)
+ polyglot (~> 0.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ lvmsync
+
+BUNDLED WITH
+ 2.1.4
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/default.nix
new file mode 100644
index 000000000000..75962c98f8b6
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, bundlerEnv, ruby, bundlerUpdateScript, makeWrapper }:
+
+stdenv.mkDerivation rec {
+ pname = "lvmsync";
+ version = (import ./gemset.nix).${pname}.version;
+
+ buildInputs = [ makeWrapper ];
+
+ phases = ["installPhase"];
+
+ installPhase = let
+ env = bundlerEnv {
+ name = "${pname}-${version}-gems";
+ ruby = ruby;
+ gemfile = ./Gemfile;
+ lockfile = ./Gemfile.lock;
+ gemset = ./gemset.nix;
+ };
+ in ''
+ mkdir -p $out/bin
+ makeWrapper ${env}/bin/lvmsync $out/bin/lvmsync
+ '';
+
+ passthru.updateScript = bundlerUpdateScript "lvmsync";
+
+ meta = with stdenv.lib; {
+ description = "Optimised synchronisation of LVM snapshots over a network";
+ homepage = "https://theshed.hezmatt.org/lvmsync/";
+ license = licenses.gpl3;
+ platforms = platforms.all;
+ maintainers = with maintainers; [ jluttine nicknovitski ];
+ };
+
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/gemset.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/gemset.nix
new file mode 100644
index 000000000000..7f80e928660b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/lvmsync/gemset.nix
@@ -0,0 +1,36 @@
+{
+ git-version-bump = {
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0xcj20gmbpqn2gcpid4pxpnimfdg2ip9jnl1572naz0magcrwl2s";
+ type = "gem";
+ };
+ version = "0.15.1";
+ };
+ lvmsync = {
+ dependencies = ["git-version-bump" "treetop"];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "02mdrvfibvab4p4yrdzxvndhy8drss3ri7izybcwgpbyc7isk8mv";
+ type = "gem";
+ };
+ version = "3.3.2";
+ };
+ polyglot = {
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr";
+ type = "gem";
+ };
+ version = "0.3.5";
+ };
+ treetop = {
+ dependencies = ["polyglot"];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0sdkd1v2h8dhj9ncsnpywmqv7w1mdwsyc5jwyxlxwriacv8qz8bd";
+ type = "gem";
+ };
+ version = "1.6.9";
+ };
+} \ No newline at end of file
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/monolith/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/monolith/default.nix
new file mode 100644
index 000000000000..9d33ce1f3f85
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/monolith/default.nix
@@ -0,0 +1,34 @@
+{ stdenv
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, openssl
+, Security
+}:
+
+rustPlatform.buildRustPackage rec {
+ pname = "monolith";
+ version = "2.3.1";
+
+ src = fetchFromGitHub {
+ owner = "Y2Z";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "16k5mp64a5l063rdj65hbpx414xv0bqdvhvz49k8018f2a2jj5xl";
+ };
+
+ cargoSha256 = "0s5mv8mymycz4ga4zh9kbrhwmhgl4j01pw1sdzxy49l9waryk9p3";
+
+ nativeBuildInputs = stdenv.lib.optionals stdenv.isLinux [ pkg-config ];
+ buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ]
+ ++ stdenv.lib.optionals stdenv.isDarwin [ Security ];
+
+ checkFlagsArray = [ "--skip=tests::cli" ];
+
+ meta = with stdenv.lib; {
+ description = "Bundle any web page into a single HTML file";
+ homepage = "https://github.com/Y2Z/monolith";
+ license = licenses.unlicense;
+ maintainers = with maintainers; [ filalex77 ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/mt-st/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/mt-st/default.nix
new file mode 100644
index 000000000000..57201d69dbac
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/mt-st/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "mt-st-1.3";
+
+ src = fetchurl {
+ url = "https://github.com/iustin/mt-st/releases/download/${name}/${name}.tar.gz";
+ sha256 = "b552775326a327cdcc076c431c5cbc4f4e235ac7c41aa931ad83f94cccb9f6de";
+ };
+
+ installFlags = [ "PREFIX=$(out)" "EXEC_PREFIX=$(out)" ];
+
+ meta = {
+ description = "Magnetic Tape control tools for Linux";
+ longDescription = ''
+ Fork of the standard "mt" tool with additional Linux-specific IOCTLs.
+ '';
+ homepage = "https://github.com/iustin/mt-st";
+ license = stdenv.lib.licenses.gpl2;
+ maintainers = [ stdenv.lib.maintainers.redvers ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/mtx/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/mtx/default.nix
new file mode 100644
index 000000000000..2a2dd80c566b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/mtx/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "mtx-1.3.12";
+
+ src = fetchurl {
+ url = "mirror://gentoo/distfiles/${name}.tar.gz";
+ sha256 = "0261c5e90b98b6138cd23dadecbc7bc6e2830235145ed2740290e1f35672d843";
+ };
+
+ doCheck = false;
+
+ meta = {
+ description = "Media Changer Tools";
+ longDescription = ''
+ The mtx command controls single or multi-drive SCSI media changers such as
+ tape changers, autoloaders, tape libraries, or optical media jukeboxes. It
+ can also be used with media changers that use the 'ATTACHED' API, presuming
+ that they properly report the MChanger bit as required by the SCSI T-10 SMC
+ specification.
+ '';
+ homepage = "https://sourceforge.net/projects/mtx/";
+ license = stdenv.lib.licenses.gpl2;
+ maintainers = [ stdenv.lib.maintainers.redvers ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/mydumper/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/mydumper/default.nix
new file mode 100644
index 000000000000..611e543ca6ce
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/mydumper/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig
+, glib, zlib, pcre, libmysqlclient, libressl }:
+
+let inherit (stdenv.lib) getDev; in
+
+stdenv.mkDerivation rec {
+ version = "0.9.5";
+ pname = "mydumper";
+
+ src = fetchFromGitHub {
+ owner = "maxbube";
+ repo = "mydumper";
+ rev = "v${version}";
+ sha256 = "0vbz0ri5hm6yzkrcgnaj8px6bf59myr5dbhyy7fd4cv44hr685k6";
+ };
+
+ nativeBuildInputs = [ cmake pkgconfig ];
+
+ buildInputs = [ glib zlib pcre libmysqlclient libressl ];
+
+ cmakeFlags = [ "-DMYSQL_INCLUDE_DIR=${getDev libmysqlclient}/include/mysql" ];
+
+ meta = with stdenv.lib; {
+ description = ''High-perfomance MySQL backup tool'';
+ homepage = "https://github.com/maxbube/mydumper";
+ license = licenses.gpl3;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ izorkin ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/ori/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/ori/default.nix
new file mode 100644
index 000000000000..e3b4a0fb537e
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/ori/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, boost, pkgconfig, scons, utillinux, fuse, libevent, openssl, zlib }:
+
+stdenv.mkDerivation {
+ version = "0.8.1";
+ pname = "ori";
+
+ src = fetchurl {
+ url = "https://bitbucket.org/orifs/ori/downloads/ori-0.8.1.tar.xz";
+ sha256 = "8ce1a3dfbb6d1538885e993616bdfe71be44711d48f7f6798ff6bc0a39b3deca";
+ };
+
+ buildInputs = [
+ boost pkgconfig scons utillinux fuse libevent openssl zlib
+ ];
+
+ buildPhase = ''
+ scons PREFIX=$out WITH_ORILOCAL=1 install
+ '';
+
+ installPhase = ":";
+
+ meta = with stdenv.lib; {
+ description = "A secure distributed file system";
+ homepage = "http://ori.scs.stanford.edu/";
+ license = licenses.mit;
+ platforms = platforms.unix;
+ broken = true; # 2018-04-11
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/partclone/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/partclone/default.nix
new file mode 100644
index 000000000000..2a325046123e
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/partclone/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchFromGitHub, autoreconfHook
+, pkgconfig, libuuid, e2fsprogs, nilfs-utils, ntfs3g
+}:
+
+stdenv.mkDerivation rec {
+ pname = "partclone";
+ version = "0.3.11";
+
+ src = fetchFromGitHub {
+ owner = "Thomas-Tsai";
+ repo = "partclone";
+ rev = version;
+ sha256 = "0bv15i0gxym4dv48rgaavh8p94waryn1l6viis6qh5zm9cd08skg";
+ };
+
+ nativeBuildInputs = [ autoreconfHook pkgconfig ];
+ buildInputs = [
+ e2fsprogs libuuid stdenv.cc.libc nilfs-utils ntfs3g
+ (stdenv.lib.getOutput "static" stdenv.cc.libc)
+ ];
+
+ configureFlags = [
+ "--enable-xfs"
+ "--enable-extfs"
+ "--enable-hfsp"
+ "--enable-fat"
+ "--enable-exfat"
+ "--enable-ntfs"
+ "--enable-btrfs"
+ "--enable-minix"
+ "--enable-f2fs"
+ "--enable-nilfs2"
+ ];
+
+ enableParallelBuilding = true;
+
+ meta = {
+ description = "Utilities to save and restore used blocks on a partition";
+ longDescription = ''
+ Partclone provides utilities to save and restore used blocks on a
+ partition and is designed for higher compatibility of the file system by
+ using existing libraries, e.g. e2fslibs is used to read and write the
+ ext2 partition.
+ '';
+ homepage = "https://partclone.org";
+ license = stdenv.lib.licenses.gpl2;
+ maintainers = [stdenv.lib.maintainers.marcweber];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/partimage/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/partimage/default.nix
new file mode 100644
index 000000000000..cec19c399335
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/partimage/default.nix
@@ -0,0 +1,47 @@
+{stdenv
+, fetchurl
+, fetchpatch
+, bzip2
+, zlib
+, newt
+, openssl
+, pkgconfig
+, slang
+, autoreconfHook
+}:
+stdenv.mkDerivation {
+ name = "partimage-0.6.9";
+ enableParallelBuilding = true;
+
+ src = fetchurl {
+ url = "mirror://sourceforge/partimage/partimage-0.6.9.tar.bz2";
+ sha256 = "0db6xiphk6xnlpbxraiy31c5xzj0ql6k4rfkmqzh665yyj0nqfkm";
+ };
+
+ configureFlags = [ "--with-ssl-headers=${openssl.dev}/include/openssl" ];
+
+ nativeBuildInputs = [ pkgconfig autoreconfHook ];
+ buildInputs = [ bzip2 zlib newt newt openssl slang ];
+
+ patches = [
+ ./gentoos-zlib.patch
+ (fetchpatch {
+ name = "openssl-1.1.patch";
+ url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-block/partimage/files/"
+ + "partimage-0.6.9-openssl-1.1-compatibility.patch?id=3fe8e9910002b6523d995512a646b063565d0447";
+ sha256 = "1hs0krxrncxq1w36bhad02yk8yx71zcfs35cw87c82sl2sfwasjg";
+ })
+ (fetchpatch {
+ url = "https://sources.debian.org/data/main/p/partimage/0.6.9-8/debian/patches/04-fix-FTBFS-glic-2.28.patch";
+ sha256 = "0xid5636g58sxbhxnjmfjdy7y8rf3c77zmmpfbbqv4lv9jd2gmxm";
+ })
+ ];
+
+ meta = {
+ description = "Opensource disk backup software";
+ homepage = "http://www.partimage.org";
+ license = stdenv.lib.licenses.gpl2;
+ maintainers = [stdenv.lib.maintainers.marcweber];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/partimage/gentoos-zlib.patch b/infra/libkookie/nixpkgs/pkgs/tools/backup/partimage/gentoos-zlib.patch
new file mode 100644
index 000000000000..05150e131e36
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/partimage/gentoos-zlib.patch
@@ -0,0 +1,33 @@
+http://bugs.gentoo.org/405323
+
+--- a/src/client/imagefile.cpp
++++ b/src/client/imagefile.cpp
+@@ -783,7 +783,7 @@
+ else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
+ {
+ showDebug(1, "open gzip\n");
+- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h");
++ m_gzImageFile = gzdopen(m_nFdImage, "wb"); //"wb1h");
+ if (m_gzImageFile == NULL)
+ {
+ showDebug(1, "error:%d %s\n", errno, strerror(errno));
+@@ -1098,7 +1098,7 @@
+ }
+ else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
+ {
+- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb");
++ m_gzImageFile = gzdopen(m_nFdImage, "rb");
+ if (m_gzImageFile == NULL)
+ THROW(ERR_ERRNO, errno);
+ else
+--- a/src/client/imagefile.h
++++ b/src/client/imagefile.h
+@@ -41,7 +41,7 @@
+ COptions m_options;
+
+ FILE *m_fImageFile;
+- gzFile *m_gzImageFile;
++ gzFile m_gzImageFile;
+ BZFILE *m_bzImageFile;
+
+ int m_nFdImage;
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/2_4.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/2_4.nix
new file mode 100644
index 000000000000..5c9ce70e5b95
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/2_4.nix
@@ -0,0 +1,6 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+ version = "2.4.20";
+ sha256 = "0awdpkcgvx2aq7pwxy8jyzkin6cyrrh3d576x9ldm851kis9n5ii";
+})
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/8_0.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/8_0.nix
new file mode 100644
index 000000000000..2878e93fe70c
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/8_0.nix
@@ -0,0 +1,14 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+ version = "8.0.13";
+ sha256 = "0cj0fnjimv22ykfl0yk6w29wcjvqp8y8j2g1c6gcml65qazrswyr";
+
+ extraPatches = [
+ ./../../../servers/sql/mysql/abi-check.patch
+ ];
+
+ extraPostInstall = ''
+ rm -r "$out"/docs
+ '';
+})
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/generic.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/generic.nix
new file mode 100644
index 000000000000..9339e8155eab
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/percona-xtrabackup/generic.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchFromGitHub, bison, boost, cmake, makeWrapper, pkgconfig
+, curl, cyrus_sasl, libaio, libedit, libev, libevent, libgcrypt, libgpgerror, lz4
+, ncurses, numactl, openssl, protobuf, valgrind, xxd, zlib
+, perlPackages
+, version, sha256, extraPatches ? [], extraPostInstall ? "", ...
+}:
+
+stdenv.mkDerivation rec {
+ pname = "percona-xtrabackup";
+ inherit version;
+
+ src = fetchFromGitHub {
+ owner = "percona";
+ repo = "percona-xtrabackup";
+ rev = "${pname}-${version}";
+ inherit sha256;
+ };
+
+ nativeBuildInputs = [ bison boost cmake makeWrapper pkgconfig ];
+
+ buildInputs = [
+ curl cyrus_sasl libaio libedit libev libevent libgcrypt libgpgerror lz4
+ ncurses numactl openssl protobuf valgrind xxd zlib
+ ] ++ (with perlPackages; [ perl DBI DBDmysql ]);
+
+ patches = extraPatches;
+
+ cmakeFlags = [
+ "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
+ "-DBUILD_CONFIG=xtrabackup_release"
+ "-DINSTALL_MYSQLTESTDIR=OFF"
+ "-DWITH_BOOST=system"
+ "-DWITH_CURL=system"
+ "-DWITH_EDITLINE=system"
+ "-DWITH_LIBEVENT=system"
+ "-DWITH_LZ4=system"
+ "-DWITH_PROTOBUF=system"
+ "-DWITH_SASL=system"
+ "-DWITH_SSL=system"
+ "-DWITH_ZLIB=system"
+ "-DWITH_VALGRIND=ON"
+ "-DWITH_MAN_PAGES=OFF"
+ "-DCMAKE_SKIP_BUILD_RPATH=OFF" # To run libmysql/libmysql_api_test during build.
+ ];
+
+ postInstall = ''
+ wrapProgram "$out"/bin/xtrabackup --prefix PERL5LIB : $PERL5LIB
+ rm -r "$out"/lib/plugin/debug
+ '' + extraPostInstall;
+
+ meta = with stdenv.lib; {
+ description = "Non-blocking backup tool for MySQL";
+ homepage = "http://www.percona.com/software/percona-xtrabackup";
+ license = licenses.lgpl2;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ izorkin ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/pyznap/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/pyznap/default.nix
new file mode 100644
index 000000000000..81f3a99ecd91
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/pyznap/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, buildPythonApplication
+, fetchPypi
+, setuptools
+}:
+
+buildPythonApplication rec {
+ pname = "pyznap";
+ version = "1.6.0";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "88bf1d6de2c11f14acbdfa01b61eb95c94f95d829ddebdaee3786b64ccb93ae3";
+ };
+
+ propagatedBuildInputs = [
+ setuptools
+ ];
+
+ # tests aren't included in the PyPI packages
+ doCheck = false;
+
+ meta = {
+ homepage = "https://github.com/yboetz/pyznap";
+ description = "ZFS snapshot tool written in python";
+ license = with lib.licenses; [ gpl3 ];
+ maintainers = with lib.maintainers; [ rbrewer ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/rdedup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdedup/default.nix
new file mode 100644
index 000000000000..83b14d87db7b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdedup/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, libsodium
+, llvmPackages, clang, lzma
+, Security }:
+
+rustPlatform.buildRustPackage rec {
+ pname = "rdedup";
+ version = "3.1.1";
+
+ src = fetchFromGitHub {
+ owner = "dpc";
+ repo = "rdedup";
+ rev = "rdedup-v${version}";
+ sha256 = "0y34a3mpghdmcb2rx4z62q0s351bfmy1287d75mm07ryfgglgsd7";
+ };
+
+ cargoSha256 = "0akwb7ak4h1i1zk4wcn27zyqjz6mrchs47014xbzw22rj8h8dx92";
+
+ cargoPatches = [
+ ./v3.1.1-fix-Cargo.lock.patch
+ ];
+
+ nativeBuildInputs = [ pkgconfig llvmPackages.libclang clang ];
+ buildInputs = [ openssl libsodium lzma ]
+ ++ (stdenv.lib.optional stdenv.isDarwin Security);
+
+ configurePhase = ''
+ export LIBCLANG_PATH="${llvmPackages.libclang}/lib"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Data deduplication with compression and public key encryption";
+ homepage = "https://github.com/dpc/rdedup";
+ license = licenses.mpl20;
+ maintainers = with maintainers; [ dywedir ];
+ broken = stdenv.isDarwin;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/rdedup/v3.1.1-fix-Cargo.lock.patch b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdedup/v3.1.1-fix-Cargo.lock.patch
new file mode 100644
index 000000000000..7dafc7765b7d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdedup/v3.1.1-fix-Cargo.lock.patch
@@ -0,0 +1,28 @@
+diff --git a/Cargo.lock b/Cargo.lock
+index 96be83a..fe07471 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -880,12 +880,12 @@ dependencies = [
+
+ [[package]]
+ name = "rdedup"
+-version = "3.1.0"
++version = "3.1.1"
+ dependencies = [
+ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+- "rdedup-lib 3.0.0",
++ "rdedup-lib 3.1.0",
+ "rpassword 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "slog 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -900,7 +900,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+ name = "rdedup-lib"
+-version = "3.0.0"
++version = "3.1.0"
+ dependencies = [
+ "backblaze-b2 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/rdiff-backup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdiff-backup/default.nix
new file mode 100644
index 000000000000..707ba8a9885b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdiff-backup/default.nix
@@ -0,0 +1,23 @@
+{stdenv, fetchurl, python2Packages, librsync, gnused }:
+
+python2Packages.buildPythonApplication {
+ name = "rdiff-backup-1.3.3";
+
+ src = fetchurl {
+ url = "mirror://savannah/rdiff-backup/rdiff-backup-1.3.3.tar.gz";
+ sha256 = "01hcwf5rgqi303fa4kdjkbpa7n8mvvh7h9gpgh2b23nz73k0q0zf";
+ };
+
+ patches = [ ./fix-librsync-rs_default_strong_len.patch ];
+
+ buildInputs = [ librsync gnused ];
+
+ doCheck = false;
+
+ meta = {
+ description = "Backup system trying to combine best a mirror and an incremental backup system";
+ homepage = "http://rdiff-backup.nongnu.org/";
+ license = stdenv.lib.licenses.gpl2;
+ platforms = stdenv.lib.platforms.all;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/rdiff-backup/fix-librsync-rs_default_strong_len.patch b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdiff-backup/fix-librsync-rs_default_strong_len.patch
new file mode 100644
index 000000000000..ce23c8a8124f
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdiff-backup/fix-librsync-rs_default_strong_len.patch
@@ -0,0 +1,20 @@
+Patch by Roman Tereshonkov and Kari Hautio for rdiff-backup <= 1.2.8 to avoid a build failure with
+librsync >= 1.0.0 (which is a security bugfix release). The discussion and solution finding can be
+found at https://bugs.launchpad.net/duplicity/+bug/1416344 (for duplicity).
+
+--- rdiff-backup-1.2.8/_librsyncmodule.c 2009-03-16 15:36:21.000000000 +0100
++++ rdiff-backup-1.2.8/_librsyncmodule.c.librsync-1.0.0 2015-03-02 00:54:24.000000000 +0100
+@@ -59,8 +59,13 @@
+ if (sm == NULL) return NULL;
+ sm->x_attr = NULL;
+
++#ifdef RS_DEFAULT_STRONG_LEN
+ sm->sig_job = rs_sig_begin((size_t)blocklen,
+ (size_t)RS_DEFAULT_STRONG_LEN);
++#else
++ sm->sig_job = rs_sig_begin((size_t)blocklen,
++ (size_t)8, RS_MD4_SIG_MAGIC);
++#endif
+ return (PyObject*)sm;
+ }
+
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/rdup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdup/default.nix
new file mode 100644
index 000000000000..0df4ecda89ef
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/rdup/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, glib, pcre }:
+
+stdenv.mkDerivation {
+ pname = "rdup";
+ version = "1.1.15";
+
+ src = fetchFromGitHub {
+ owner = "miekg";
+ repo = "rdup";
+ rev = "d66e4320cd0bbcc83253baddafe87f9e0e83caa6";
+ sha256 = "0bzyv6qmnivxnv9nw7lnfn46k0m1dlxcjj53zcva6v8y8084l1iw";
+ };
+
+ nativeBuildInputs = [ autoreconfHook pkgconfig ];
+ buildInputs = [ glib pcre ];
+
+ meta = {
+ description = "The only backup program that doesn't make backups";
+ homepage = "https://github.com/miekg/rdup";
+ license = stdenv.lib.licenses.gpl3;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/default.nix
new file mode 100644
index 000000000000..33cac4ad229b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub, installShellFiles, makeWrapper
+, nixosTests, rclone }:
+
+buildGoPackage rec {
+ pname = "restic";
+ version = "0.9.6";
+
+ goPackagePath = "github.com/restic/restic";
+
+ src = fetchFromGitHub {
+ owner = "restic";
+ repo = "restic";
+ rev = "v${version}";
+ sha256 = "0lydll93n1lcn1fl669b9cikmzz9d6vfpc8ky3ng5fi8kj3v1dz7";
+ };
+
+ subPackages = [ "cmd/restic" ];
+
+ nativeBuildInputs = [ installShellFiles makeWrapper ];
+
+ passthru.tests.restic = nixosTests.restic;
+
+ postInstall = ''
+ wrapProgram $out/bin/restic --prefix PATH : '${rclone}/bin'
+ '' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
+ $out/bin/restic generate \
+ --bash-completion restic.bash \
+ --zsh-completion restic.zsh \
+ --man .
+ installShellCompletion restic.{bash,zsh}
+ installManPage *.1
+ '';
+
+ meta = with lib; {
+ homepage = "https://restic.net";
+ description = "A backup program that is fast, efficient and secure";
+ platforms = platforms.linux ++ platforms.darwin;
+ license = licenses.bsd2;
+ maintainers = [ maintainers.mbrgm ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
new file mode 100644
index 000000000000..45a4df74b15d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/restic/rest-server.nix
@@ -0,0 +1,32 @@
+{ lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+ pname = "restic-rest-server";
+ version = "0.9.7";
+
+ goPackagePath = "github.com/restic/rest-server";
+
+ src = fetchFromGitHub {
+ owner = "restic";
+ repo = "rest-server";
+ rev = "v${version}";
+ sha256 = "1g47ly1pxwn0znbj3v5j6kqhn66d4wf0d5gjqzig75pzknapv8qj";
+ };
+
+ buildPhase = ''
+ cd go/src/${goPackagePath}
+ go run build.go
+ '';
+
+ installPhase = ''
+ install -Dt $out/bin rest-server
+ '';
+
+ meta = with lib; {
+ inherit (src.meta) homepage;
+ description = "A high performance HTTP server that implements restic's REST backend API";
+ platforms = platforms.unix;
+ license = licenses.bsd2;
+ maintainers = with maintainers; [ dotlambda ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/rotate-backups/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/rotate-backups/default.nix
new file mode 100644
index 000000000000..c0a06e1b9ae5
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/rotate-backups/default.nix
@@ -0,0 +1,23 @@
+{ lib, buildPythonPackage, fetchFromGitHub, update-dotdee, simpleeval, dateutil }:
+
+buildPythonPackage rec {
+ pname = "rotate-backups";
+ version = "6.0";
+
+ src = fetchFromGitHub {
+ owner = "xolox";
+ repo = "python-rotate-backups";
+ rev = version;
+ sha256 = "0i59qfv1cfm0ss63ab2nrkn5wr4rxpqqmvfd7pf9c3pl9dbfq20c";
+ };
+
+ propagatedBuildInputs = [ update-dotdee simpleeval dateutil ];
+
+ meta = with lib; {
+ description = "Simple command line interface for backup rotation";
+ homepage = "https://github.com/xolox/python-rotate-backups";
+ license = licenses.mit;
+ maintainers = with maintainers; [ eyjhb ];
+ };
+}
+
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/rsbep/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/rsbep/default.nix
new file mode 100644
index 000000000000..d7967c018a26
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/rsbep/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, coreutils, gnused, gawk, fetchurl }:
+
+stdenv.mkDerivation {
+ pname = "rsbep";
+ version = "0.1.0";
+
+ src = fetchurl {
+ url = "https://www.thanassis.space/rsbep-0.1.0-ttsiodras.tar.bz2";
+ sha256 = "1zji34kc9srxp0h1s1m7k60mvgsir1wrx1n3wc990jszfplr32zc";
+ };
+
+ postFixup = ''
+ cd $out/bin
+
+ # Move internal tool 'rsbep_chopper' to libexec
+ libexecDir=$out/libexec/rsbep
+ mkdir -p $libexecDir
+ mv rsbep_chopper $libexecDir
+
+ # Fix store dependencies in scripts
+ path="export PATH=$out/bin:$libexecDir:${lib.makeBinPath [ coreutils gnused gawk ]}"
+ sed -i "2i$path" freeze.sh
+ sed -i "2i$path" melt.sh
+
+ substituteInPlace freeze.sh --replace /bin/ls ls
+
+ # Remove unneded binary
+ rm poorZFS.py
+ '';
+
+ meta = with lib; {
+ description = "Create resilient backups with Reed-Solomon error correction and byte-spreading";
+ homepage = "https://www.thanassis.space/rsbep.html";
+ license = licenses.gpl3;
+ maintainers = [ maintainers.earvstedt ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/rsnapshot/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/rsnapshot/default.nix
new file mode 100644
index 000000000000..0503dc3b6572
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/rsnapshot/default.nix
@@ -0,0 +1,27 @@
+{ fetchurl, stdenv, perl, openssh, rsync, logger }:
+
+stdenv.mkDerivation rec {
+ name = "rsnapshot-1.4.3";
+
+ src = fetchurl {
+ url = "https://rsnapshot.org/downloads/${name}.tar.gz";
+ sha256 = "1lavqmmsf53pim0nvming7fkng6p0nk2a51k2c2jdq0l7snpl31b";
+ };
+
+ propagatedBuildInputs = [perl openssh rsync logger];
+
+ configureFlags = [ "--sysconfdir=/etc --prefix=/" ];
+ makeFlags = [ "DESTDIR=$(out)" ];
+
+ patchPhase = ''
+ substituteInPlace "Makefile.in" --replace \
+ "/usr/bin/pod2man" "${perl}/bin/pod2man"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A filesystem snapshot utility for making backups of local and remote systems";
+ homepage = "https://rsnapshot.org/";
+ license = stdenv.lib.licenses.gpl2Plus;
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/s3ql/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/s3ql/default.nix
new file mode 100644
index 000000000000..346f8d279646
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/s3ql/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, python3Packages, sqlite, which }:
+
+python3Packages.buildPythonApplication rec {
+ pname = "s3ql";
+ version = "3.3.2";
+
+ src = fetchFromGitHub {
+ owner = pname;
+ repo = pname;
+ rev = "release-${version}";
+ sha256 = "1x0xj8clfs8fdczn8skc2wag5i4z47bsvlczn22iaf20hll1bb2w";
+ };
+
+ checkInputs = [ which ] ++ (with python3Packages; [ cython pytest ]);
+ propagatedBuildInputs = with python3Packages; [
+ sqlite apsw pycrypto requests defusedxml dugong llfuse
+ cython pytest pytest-catchlog google_auth google-auth-oauthlib
+ ];
+
+ preBuild = ''
+ ${python3Packages.python.interpreter} ./setup.py build_cython build_ext --inplace
+ '';
+
+ checkPhase = ''
+ # Removing integration tests
+ rm tests/t{4,5,6}_*
+ pytest tests
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A full-featured file system for online data storage";
+ homepage = "https://github.com/s3ql/s3ql/";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ rushmorem ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/sanoid/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/sanoid/default.nix
new file mode 100644
index 000000000000..569a07a459be
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/sanoid/default.nix
@@ -0,0 +1,75 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper, coreutils, zfs
+, perlPackages, procps, which, openssh, sudo, mbuffer, pv, lzop, gzip, pigz }:
+
+with lib;
+
+stdenv.mkDerivation rec {
+ pname = "sanoid";
+ version = "2.0.3";
+
+ src = fetchFromGitHub {
+ owner = "jimsalterjrs";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "1wmymzqg503nmhw8hrblfs67is1l3ljbk2fjvrqwyb01b7mbn80x";
+ };
+
+ patches = [
+ # Make sanoid look for programs in PATH
+ (fetchpatch {
+ url = "https://github.com/jimsalterjrs/sanoid/commit/dc2371775afe08af799d3097d47b48182d1716eb.patch";
+ sha256 = "16hlwcbcb8h3ar1ywd2bzr3h3whgbcfk6walmp8z6j74wbx81aav";
+ })
+ # Make findoid look for programs in PATH
+ (fetchpatch {
+ url = "https://github.com/jimsalterjrs/sanoid/commit/44bcd21f269e17765acd1ad0d45161902a205c7b.patch";
+ sha256 = "0zqyl8q5sfscqcc07acw68ysnlnh3nb57cigjfwbccsm0zwlwham";
+ })
+ # Add --cache-dir option
+ (fetchpatch {
+ url = "https://github.com/jimsalterjrs/sanoid/commit/a1f5e4c0c006e16a5047a16fc65c9b3663adb81e.patch";
+ sha256 = "1bb4g2zxrbvf7fvcgzzxsr1cvxzrxg5dzh89sx3h7qlrd6grqhdy";
+ })
+ # Add --run-dir option
+ (fetchpatch {
+ url = "https://github.com/jimsalterjrs/sanoid/commit/59a07f92b4920952cc9137b03c1533656f48b121.patch";
+ sha256 = "11v4jhc36v839gppzvhvzp5jd22904k8xqdhhpx6ghl75yyh4f4s";
+ })
+ ];
+
+ nativeBuildInputs = [ makeWrapper ];
+ buildInputs = with perlPackages; [ perl ConfigIniFiles CaptureTiny ];
+
+ installPhase = ''
+ mkdir -p "$out/bin"
+ mkdir -p "$out/etc/sanoid"
+ cp sanoid.defaults.conf "$out/etc/sanoid/sanoid.defaults.conf"
+ # Hardcode path to default config
+ substitute sanoid "$out/bin/sanoid" \
+ --replace "\$args{'configdir'}/sanoid.defaults.conf" "$out/etc/sanoid/sanoid.defaults.conf"
+ chmod +x "$out/bin/sanoid"
+ # Prefer ZFS userspace tools from /run/booted-system/sw/bin to avoid
+ # incompatibilities with the ZFS kernel module.
+ wrapProgram "$out/bin/sanoid" \
+ --prefix PERL5LIB : "$PERL5LIB" \
+ --prefix PATH : "${makeBinPath [ procps "/run/booted-system/sw" zfs ]}"
+
+ install -m755 syncoid "$out/bin/syncoid"
+ wrapProgram "$out/bin/syncoid" \
+ --prefix PERL5LIB : "$PERL5LIB" \
+ --prefix PATH : "${makeBinPath [ openssh procps which pv mbuffer lzop gzip pigz "/run/booted-system/sw" zfs ]}"
+
+ install -m755 findoid "$out/bin/findoid"
+ wrapProgram "$out/bin/findoid" \
+ --prefix PERL5LIB : "$PERL5LIB" \
+ --prefix PATH : "${makeBinPath [ "/run/booted-system/sw" zfs ]}"
+ '';
+
+ meta = {
+ description = "A policy-driven snapshot management tool for ZFS filesystems";
+ homepage = "https://github.com/jimsalterjrs/sanoid";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ lopsided98 ];
+ platforms = platforms.all;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/stenc/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/stenc/default.nix
new file mode 100644
index 000000000000..11859c4f8be4
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/stenc/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+ version = "1.0.7";
+ pname = "stenc";
+
+ src = fetchFromGitHub {
+ owner = "scsitape";
+ repo = "stenc";
+ rev = "${version}";
+ sha256 = "1778m1zcyzyf42k5m496yqh0gv6kqhb0sq5983dhky1fccjl905k";
+ };
+
+ meta = {
+ description = "SCSI Tape Encryption Manager";
+ homepage = "https://github.com/scsitape/stenc";
+ license = stdenv.lib.licenses.gpl2;
+ maintainers = with stdenv.lib.maintainers; [ woffs ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/store-backup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/store-backup/default.nix
new file mode 100644
index 000000000000..bd1c0d802aa0
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/store-backup/default.nix
@@ -0,0 +1,111 @@
+{stdenv, which, coreutils, perl, fetchurl, perlPackages, makeWrapper, diffutils , writeScriptBin, bzip2}:
+
+# quick usage:
+# storeBackup.pl --sourceDir /home/user --backupDir /tmp/my_backup_destination
+# Its slow the first time because it compresses all files bigger than 1k (default setting)
+# The backup tool is bookkeeping which files got compressed
+
+# btrfs warning: you may run out of hardlinks soon
+
+# known impurity: test cases seem to bu using /tmp/storeBackup.lock ..
+
+let dummyMount = writeScriptBin "mount" "#!${stdenv.shell}";
+in
+
+stdenv.mkDerivation rec {
+
+ version = "3.5";
+
+ pname = "store-backup";
+
+ enableParallelBuilding = true;
+
+ buildInputs = [ perl makeWrapper ];
+
+ src = fetchurl {
+ url = "https://download.savannah.gnu.org/releases/storebackup/storeBackup-${version}.tar.bz2";
+ sha256 = "0y4gzssc93x6y93mjsxm5b5cdh68d7ffa43jf6np7s7c99xxxz78";
+ };
+
+ installPhase = ''
+ mkdir -p $out/scripts
+ mv * $out
+ mv $out/_ATTENTION_ $out/doc
+ mv $out/{correct.sh,cron-storebackup} $out/scripts
+
+ find $out -name "*.pl" | xargs sed -i \
+ -e 's@/bin/pwd@${coreutils}/bin/pwd@' \
+ -e 's@/bin/sync@${coreutils}/bin/sync@' \
+ -e '1 s@/usr/bin/env perl@${perl}/bin/perl@'
+
+ for p in $out/bin/*
+ do wrapProgram "$p" \
+ --prefix PERL5LIB ":" "${perlPackages.DBFile}/${perlPackages.perl.libPrefix}" \
+ --prefix PATH ":" "${stdenv.lib.makeBinPath [ which bzip2 ]}"
+ done
+
+ patchShebangs $out
+ # do a dummy test ensuring this works
+
+ PATH=$PATH:${dummyMount}/bin
+
+
+ { # simple sanity test, test backup/restore of simple store paths
+
+ mkdir backup
+
+ backupRestore(){
+ source="$2"
+ echo =========
+ echo RUNNING TEST "$1" source: "$source"
+ mkdir restored
+
+ $out/bin/storeBackup.pl --sourceDir "$source" --backupDir backup
+ latestBackup=backup/default/$(ls -1 backup/default | sort | tail -n 1)
+ $out/bin/storeBackupRecover.pl -b "$latestBackup" -t restored -r /
+ ${diffutils}/bin/diff -r "$source" restored
+
+ # storeBackupCheckSource should return 0
+ $out/bin/storeBackupCheckSource.pl -s "$source" -b "$latestBackup"
+ # storeBackupCheckSource should return not 0 when using different source
+ ! $out/bin/storeBackupCheckSource.pl -s $TMP -b "$latestBackup"
+
+ # storeBackupCheckBackup should return 0
+ $out/bin/storeBackupCheckBackup.pl -c "$latestBackup"
+
+ chmod -R +w restored
+ rm -fr restored
+ }
+
+ testDir=$TMP/testDir
+
+ mkdir $testDir
+ echo X > $testDir/X
+ ln -s ./X $testDir/Y
+
+ backupRestore 'test 1: backup, restore' $testDir
+
+ # test huge blocks, according to docs files bigger than 100MB get split
+ # into pieces
+ dd if=/dev/urandom bs=100M of=block-1 count=1
+ dd if=/dev/urandom bs=100M of=block-2 count=1
+ cat block-1 block-2 > $testDir/block
+ backupRestore 'test 1 with huge block' $testDir
+
+ cat block-2 block-1 > $testDir/block
+ backupRestore 'test 1 with huge block reversed' $testDir
+
+ backupRestore 'test 2: backup, restore' $out
+ backupRestore 'test 3: backup, restore' $out
+ backupRestore 'test 4: backup diffutils to same backup locations, restore' ${diffutils}
+ }
+ '';
+
+ meta = {
+ description = "A backup suite that stores files on other disks";
+ homepage = "https://savannah.nongnu.org/projects/storebackup";
+ license = stdenv.lib.licenses.gpl3Plus;
+ maintainers = [stdenv.lib.maintainers.marcweber];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnap/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnap/default.nix
new file mode 100644
index 000000000000..8d23e955095a
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnap/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, openssl, zlib, e2fsprogs }:
+
+let
+ zshCompletion = fetchurl {
+ url = "https://gist.githubusercontent.com/thoughtpolice/daa9431044883d3896f6/raw/282360677007db9739e5bf229873d3b231eb303a/tarsnap.zsh";
+ sha256 = "0pawqwichzpz29rva7mh8lpx4zznnrh2rqyzzj6h7z98l0dxpair";
+ };
+in
+stdenv.mkDerivation rec {
+ pname = "tarsnap";
+ version = "1.0.39";
+
+ src = fetchurl {
+ url = "https://www.tarsnap.com/download/tarsnap-autoconf-${version}.tgz";
+ sha256 = "10i0whbmb345l2ggnf4vs66qjcyf6hmlr8f4nqqcfq0h5a5j24sn";
+ };
+
+ preConfigure = ''
+ configureFlags="--with-bash-completion-dir=$out/etc/bash_completion.d"
+ '';
+
+ patchPhase = ''
+ substituteInPlace Makefile.in \
+ --replace "command -p mv" "mv"
+ '';
+
+ postInstall = ''
+ # Install some handy-dandy shell completions
+ install -m 444 -D ${zshCompletion} $out/share/zsh/site-functions/_tarsnap
+ '';
+
+ buildInputs = [ openssl zlib ] ++ stdenv.lib.optional stdenv.isLinux e2fsprogs ;
+
+ meta = {
+ description = "Online backups for the truly paranoid";
+ homepage = "http://www.tarsnap.com/";
+ license = stdenv.lib.licenses.unfree;
+ platforms = stdenv.lib.platforms.unix;
+ maintainers = with stdenv.lib.maintainers; [ thoughtpolice roconnor ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnapper/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnapper/default.nix
new file mode 100644
index 000000000000..b02ce82291aa
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnapper/default.nix
@@ -0,0 +1,25 @@
+{ python3Packages, fetchFromGitHub , tarsnap }:
+
+python3Packages.buildPythonApplication rec {
+ name = "tarsnapper-${version}";
+ version = "0.4";
+
+ src = fetchFromGitHub {
+ owner = "miracle2k";
+ repo = "tarsnapper";
+ rev = version;
+ sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
+ };
+
+ checkInputs = with python3Packages; [ nose pytest ];
+
+ checkPhase = ''
+ py.test .
+ '';
+
+ propagatedBuildInputs = with python3Packages; [ pyyaml dateutil pexpect ];
+
+ patches = [ ./remove-argparse.patch ];
+
+ makeWrapperArgs = ["--prefix PATH : ${tarsnap}/bin"];
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnapper/remove-argparse.patch b/infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnapper/remove-argparse.patch
new file mode 100644
index 000000000000..19c7f9f172e2
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/tarsnapper/remove-argparse.patch
@@ -0,0 +1,10 @@
+--- tarsnapper-0.4-src.org/setup.py 1980-01-02 00:00:00.000000000 +0000
++++ tarsnapper-0.4-src/setup.py 2017-07-16 10:54:36.596499451 +0100
+@@ -45,6 +45,6 @@
+ url='https://github.com/miracle2k/tarsnapper',
+ license='BSD',
+ packages=['tarsnapper'],
+- install_requires = ['argparse>=1.1', 'pyyaml>=3.09', 'python-dateutil>=2.4.0', 'pexpect>=3.1'],
++ install_requires = ['pyyaml>=3.09', 'python-dateutil>=2.4.0', 'pexpect>=3.1'],
+ **kw
+ )
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/tsm-client/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/tsm-client/default.nix
new file mode 100644
index 000000000000..c432d47becde
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/tsm-client/default.nix
@@ -0,0 +1,165 @@
+{ lib
+, stdenv
+, autoPatchelfHook
+, buildEnv
+, fetchurl
+, makeWrapper
+, procps
+, zlib
+# optional packages that enable certain features
+, acl ? null # EXT2/EXT3/XFS ACL support
+, jdk8 ? null # Java GUI
+, lvm2 ? null # LVM image backup and restore functions
+# path to `dsm.sys` configuration files
+, dsmSysCli ? "/etc/tsm-client/cli.dsm.sys"
+, dsmSysApi ? "/etc/tsm-client/api.dsm.sys"
+}:
+
+
+# For an explanation of optional packages
+# (features provided by them, version limits), see
+# https://www-01.ibm.com/support/docview.wss?uid=swg21052223#Version%208.1
+
+
+# IBM Tivoli Storage Manager Client uses a system-wide
+# client system-options file `dsm.sys` and expects it
+# to be located in a directory within the package.
+# Note that the command line client and the API use
+# different "dms.sys" files (located in different directories).
+# Since these files contain settings to be altered by the
+# admin user (e.g. TSM server name), we create symlinks
+# in place of the files that the client attempts to open.
+# Use the arguments `dsmSysCli` and `dsmSysApi` to
+# provide the location of the configuration files for
+# the command-line interface and the API, respectively.
+#
+# While the command-line interface contains wrappers
+# that help the executables find the configuration file,
+# packages that link against the API have to
+# set the environment variable `DSMI_DIR` to
+# point to this derivations `/dsmi_dir` directory symlink.
+# Other environment variables might be necessary,
+# depending on local configuration or usage; see:
+# https://www.ibm.com/support/knowledgecenter/en/SSEQVQ_8.1.8/client/c_cfg_sapiunix.html
+
+
+# The newest version of TSM client should be discoverable
+# by going the the `downloadPage` (see `meta` below),
+# there to "Client Latest Downloads",
+# "IBM Spectrum Protect Client Downloads and READMEs",
+# then to "Linux x86_64 Ubuntu client" (as of 2019-07-15).
+
+
+let
+
+ meta = {
+ homepage = "https://www.ibm.com/us-en/marketplace/data-protection-and-recovery";
+ downloadPage = "https://www-01.ibm.com/support/docview.wss?uid=swg21239415";
+ platforms = [ "x86_64-linux" ];
+ license = lib.licenses.unfree;
+ maintainers = [ lib.maintainers.yarny ];
+ description = "IBM Spectrum Protect (Tivoli Storage Manager) CLI and API";
+ longDescription = ''
+ IBM Spectrum Protect (Tivoli Storage Manager) provides
+ a single point of control for backup and recovery.
+ This package contains the client software, that is,
+ a command line client and linkable libraries.
+
+ Note that the software requires a system-wide
+ client system-options file (commonly named "dsm.sys").
+ This package allows to use separate files for
+ the command-line interface and for the linkable API.
+ The location of those files can
+ be provided as build parameters.
+ '';
+ };
+
+ unwrapped = stdenv.mkDerivation rec {
+ name = "tsm-client-${version}-unwrapped";
+ version = "8.1.8.0";
+ src = fetchurl {
+ url = "ftp://public.dhe.ibm.com/storage/tivoli-storage-management/maintenance/client/v8r1/Linux/LinuxX86_DEB/BA/v818/${version}-TIV-TSMBAC-LinuxX86_DEB.tar";
+ sha256 = "0c1d0jm0i7qjd314nhj2vj8fs7sncm1x2n4d6dg4049jniyvjhpk";
+ };
+ inherit meta;
+
+ nativeBuildInputs = [
+ autoPatchelfHook
+ ];
+ buildInputs = [
+ stdenv.cc.cc
+ zlib
+ ];
+ runtimeDependencies = [
+ lvm2
+ ];
+ sourceRoot = ".";
+
+ postUnpack = ''
+ for debfile in *.deb
+ do
+ ar -x "$debfile"
+ tar --xz --extract --file=data.tar.xz
+ rm data.tar.xz
+ done
+ '';
+
+ installPhase = ''
+ runHook preInstall
+ mkdir --parents $out
+ mv --target-directory=$out usr/* opt
+ runHook postInstall
+ '';
+
+ # Fix relative symlinks after `/usr` was moved up one level
+ preFixup = ''
+ for link in $out/lib/* $out/bin/*
+ do
+ target=$(readlink "$link")
+ if [ "$(cut -b -6 <<< "$target")" != "../../" ]
+ then
+ echo "cannot fix this symlink: $link -> $target"
+ exit 1
+ fi
+ ln --symbolic --force --no-target-directory "$out/$(cut -b 7- <<< "$target")" "$link"
+ done
+ '';
+ };
+
+in
+
+buildEnv {
+ name = "tsm-client-${unwrapped.version}";
+ inherit meta;
+ passthru = { inherit unwrapped; };
+ paths = [ unwrapped ];
+ buildInputs = [ makeWrapper ];
+ pathsToLink = [
+ "/"
+ "/bin"
+ "/opt/tivoli/tsm/client/ba/bin"
+ "/opt/tivoli/tsm/client/api/bin64"
+ ];
+ # * Provide top-level symlinks `dsm_dir` and `dsmi_dir`
+ # to the so-called "installation directories"
+ # * Add symlinks to the "installation directories"
+ # that point to the `dsm.sys` configuration files
+ # * Drop the Java GUI executable unless `jdk` is present
+ # * Create wrappers for the command-line interface to
+ # prepare `PATH` and `DSM_DIR` environment variables
+ postBuild = ''
+ ln --symbolic --no-target-directory opt/tivoli/tsm/client/ba/bin $out/dsm_dir
+ ln --symbolic --no-target-directory opt/tivoli/tsm/client/api/bin64 $out/dsmi_dir
+ ln --symbolic --no-target-directory "${dsmSysCli}" $out/dsm_dir/dsm.sys
+ ln --symbolic --no-target-directory "${dsmSysApi}" $out/dsmi_dir/dsm.sys
+ ${lib.strings.optionalString (jdk8==null) "rm $out/bin/dsmj"}
+ for bin in $out/bin/*
+ do
+ target=$(readlink "$bin")
+ rm "$bin"
+ makeWrapper "$target" "$bin" \
+ --prefix PATH : "$out/dsm_dir:${lib.strings.makeBinPath [ procps acl jdk8 ]}" \
+ --set DSM_DIR $out/dsm_dir
+ done
+ '';
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit-manifest-maker/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit-manifest-maker/default.nix
new file mode 100644
index 000000000000..f763296e1d6e
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit-manifest-maker/default.nix
@@ -0,0 +1,31 @@
+{ pkgs, stdenv, eggDerivation, fetchegg }:
+let
+ eggs = import ./eggs.nix { inherit eggDerivation fetchegg; };
+in with pkgs; eggDerivation rec {
+ pname = "ugarit-manifest-maker";
+ version = "0.1";
+ name = "${pname}-${version}";
+
+ src = fetchegg {
+ inherit version;
+ name = pname;
+ sha256 = "1jv8lhn4s5a3qphqd3zfwl1py0m5cmqj1h55ys0935m5f422547q";
+ };
+
+ buildInputs = with eggs; [
+ matchable
+ srfi-37
+ fnmatch
+ miscmacros
+ ugarit
+ numbers
+ ];
+
+ meta = with stdenv.lib; {
+ homepage = "https://www.kitten-technologies.co.uk/project/ugarit-manifest-maker/";
+ description = "A tool for generating import manifests for Ugarit";
+ license = licenses.bsd3;
+ maintainers = [ maintainers.ebzzry ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit-manifest-maker/eggs.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit-manifest-maker/eggs.nix
new file mode 100644
index 000000000000..889d698188e2
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit-manifest-maker/eggs.nix
@@ -0,0 +1,431 @@
+{ eggDerivation, fetchegg }:
+rec {
+ blob-utils = eggDerivation {
+ name = "blob-utils-1.0.3";
+
+ src = fetchegg {
+ name = "blob-utils";
+ version = "1.0.3";
+ sha256 = "17vdn02fnxnjx5ixgqimln93lqvzyq4y9w02fw7xnbdcjzqm0xml";
+ };
+
+ buildInputs = [
+ setup-helper
+ string-utils
+ ];
+ };
+
+ check-errors = eggDerivation {
+ name = "check-errors-1.13.0";
+
+ src = fetchegg {
+ name = "check-errors";
+ version = "1.13.0";
+ sha256 = "12a0sn82n98jybh72zb39fdddmr5k4785xglxb16750fhy8rmjwi";
+ };
+
+ buildInputs = [
+ setup-helper
+ ];
+ };
+
+ crypto-tools = eggDerivation {
+ name = "crypto-tools-1.3";
+
+ src = fetchegg {
+ name = "crypto-tools";
+ version = "1.3";
+ sha256 = "0442wly63zis19vh8xc9nhxgp9sabaccxylpzmchd5f1d48iag65";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ fnmatch = eggDerivation {
+ name = "fnmatch-1.0.1";
+
+ src = fetchegg {
+ name = "fnmatch";
+ version = "1.0.1";
+ sha256 = "1m3jmyhkyqmjr7v628g6w5n3cqihcfnryrxn91k4597q7vjhikqr";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ foreigners = eggDerivation {
+ name = "foreigners-1.4.1";
+
+ src = fetchegg {
+ name = "foreigners";
+ version = "1.4.1";
+ sha256 = "07nvyadhkd52q0kkvch1a5d7ivpmrhmyg295s4mxb1nw4wz46gfz";
+ };
+
+ buildInputs = [
+ matchable
+ ];
+ };
+
+ lookup-table = eggDerivation {
+ name = "lookup-table-1.13.5";
+
+ src = fetchegg {
+ name = "lookup-table";
+ version = "1.13.5";
+ sha256 = "1nzly6rhynawlvzlyilk8z8cxz57cf9n5iv20glkhh28pz2izmrb";
+ };
+
+ buildInputs = [
+ setup-helper
+ check-errors
+ miscmacros
+ record-variants
+ synch
+ ];
+ };
+
+ lru-cache = eggDerivation {
+ name = "lru-cache-0.5.3";
+
+ src = fetchegg {
+ name = "lru-cache";
+ version = "0.5.3";
+ sha256 = "0z6g3106c4j21v968hfzy9nnbfq2d83y0nyd20aifpq4g55c0d40";
+ };
+
+ buildInputs = [
+ record-variants
+ ];
+ };
+
+ matchable = eggDerivation {
+ name = "matchable-3.3";
+
+ src = fetchegg {
+ name = "matchable";
+ version = "3.3";
+ sha256 = "07y3lpzgm4djiwi9y2adc796f9kwkmdr28fkfkw65syahdax8990";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ message-digest = eggDerivation {
+ name = "message-digest-3.1.0";
+
+ src = fetchegg {
+ name = "message-digest";
+ version = "3.1.0";
+ sha256 = "1w6bax19dwgih78vcimiws0rja7qsd8hmbm6qqg2hf9cw3vab21s";
+ };
+
+ buildInputs = [
+ setup-helper
+ miscmacros
+ check-errors
+ variable-item
+ blob-utils
+ string-utils
+ ];
+ };
+
+ miscmacros = eggDerivation {
+ name = "miscmacros-2.96";
+
+ src = fetchegg {
+ name = "miscmacros";
+ version = "2.96";
+ sha256 = "1ajdgjrni10i2hmhcp4rawnxajjxry3kmq1krdmah4sf0kjrgajc";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ numbers = eggDerivation {
+ name = "numbers-4.4";
+
+ src = fetchegg {
+ name = "numbers";
+ version = "4.4";
+ sha256 = "0bg5zs6jcr9arj4a7r2xqxf2n17bx93640jaivgchbdj1gixranm";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ parley = eggDerivation {
+ name = "parley-0.9.2";
+
+ src = fetchegg {
+ name = "parley";
+ version = "0.9.2";
+ sha256 = "1vsbx4dk1240gzq02slzmavd1jrq04qj7ssnvg15h8xh81xwhbbz";
+ };
+
+ buildInputs = [
+ stty
+ srfi-71
+ miscmacros
+ ];
+ };
+
+ pathname-expand = eggDerivation {
+ name = "pathname-expand-0.1";
+
+ src = fetchegg {
+ name = "pathname-expand";
+ version = "0.1";
+ sha256 = "14llya7l04z49xpi3iylk8aglrw968vy304ymavhhqlyzmzwkx3g";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ posix-extras = eggDerivation {
+ name = "posix-extras-0.1.6";
+
+ src = fetchegg {
+ name = "posix-extras";
+ version = "0.1.6";
+ sha256 = "0gnmhn2l0161ham7f8i0lx1ay94ap8l8l7ga4nw9qs86lk024abi";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ record-variants = eggDerivation {
+ name = "record-variants-0.5.1";
+
+ src = fetchegg {
+ name = "record-variants";
+ version = "0.5.1";
+ sha256 = "15wgysxkm8m4hx9nhhw9akchzipdnqc7yj3qd3zn0z7sxg4sld1h";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ regex = eggDerivation {
+ name = "regex-1.0";
+
+ src = fetchegg {
+ name = "regex";
+ version = "1.0";
+ sha256 = "1z9bh7xvab6h5cdlsz8jk02pv5py1i6ryqarbcs3wdgkkjgmmkif";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ setup-helper = eggDerivation {
+ name = "setup-helper-1.5.5";
+
+ src = fetchegg {
+ name = "setup-helper";
+ version = "1.5.5";
+ sha256 = "1lpplp8f2wyc486dd98gs4wl1kkhh1cs6vdqkxrdk7f92ikmwbx3";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ sql-de-lite = eggDerivation {
+ name = "sql-de-lite-0.6.6";
+
+ src = fetchegg {
+ name = "sql-de-lite";
+ version = "0.6.6";
+ sha256 = "1mh3hpsibq2gxcpjaycqa4ckznj268xpfzsa6pn0i6iac6my3qra";
+ };
+
+ buildInputs = [
+ lru-cache
+ foreigners
+ ];
+ };
+
+ srfi-37 = eggDerivation {
+ name = "srfi-37-1.3.1";
+
+ src = fetchegg {
+ name = "srfi-37";
+ version = "1.3.1";
+ sha256 = "1a2zdkdzrv15fw9dfdy8067fsgh4kr8ppffm8mc3cmlczrrd58cb";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ srfi-71 = eggDerivation {
+ name = "srfi-71-1.1";
+
+ src = fetchegg {
+ name = "srfi-71";
+ version = "1.1";
+ sha256 = "01mlaxw2lfczykmx69xki2s0f4ywlg794rl4kz07plvzn0s3fbqq";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ ssql = eggDerivation {
+ name = "ssql-0.2.4";
+
+ src = fetchegg {
+ name = "ssql";
+ version = "0.2.4";
+ sha256 = "0qhnghhx1wrvav4s7l780mspwlh8s6kzq4bl0cslwp1km90fx9bk";
+ };
+
+ buildInputs = [
+ matchable
+ ];
+ };
+
+ string-utils = eggDerivation {
+ name = "string-utils-1.2.4";
+
+ src = fetchegg {
+ name = "string-utils";
+ version = "1.2.4";
+ sha256 = "07alvghg0dahilrm4jg44bndl0x69sv1zbna9l20cbdvi35i0jp1";
+ };
+
+ buildInputs = [
+ setup-helper
+ miscmacros
+ lookup-table
+ check-errors
+ ];
+ };
+
+ stty = eggDerivation {
+ name = "stty-0.2.6";
+
+ src = fetchegg {
+ name = "stty";
+ version = "0.2.6";
+ sha256 = "09jmjpdsd3yg6d0f0imcihmn49i28x09lgl60i2dllffs25k22s4";
+ };
+
+ buildInputs = [
+ setup-helper
+ foreigners
+ ];
+ };
+
+ synch = eggDerivation {
+ name = "synch-2.1.2";
+
+ src = fetchegg {
+ name = "synch";
+ version = "2.1.2";
+ sha256 = "1m9mnbq0m5jsxmd1a3rqpwpxj0l1b7vn1fknvxycc047pmlcyl00";
+ };
+
+ buildInputs = [
+ setup-helper
+ check-errors
+ ];
+ };
+
+ tiger-hash = eggDerivation {
+ name = "tiger-hash-3.1.0";
+
+ src = fetchegg {
+ name = "tiger-hash";
+ version = "3.1.0";
+ sha256 = "0j9dsbjp9cw0y4w4srg0qwgh53jw2v3mx4y4h040ds0fkxlzzknx";
+ };
+
+ buildInputs = [
+ message-digest
+ ];
+ };
+
+ ugarit = eggDerivation {
+ name = "ugarit-2.0";
+
+ src = fetchegg {
+ name = "ugarit";
+ version = "2.0";
+ sha256 = "1l5zkr6b8l5dw9p5mimbva0ncqw1sbvp3d4cywm1hqx2m03a0f1n";
+ };
+
+ buildInputs = [
+ miscmacros
+ sql-de-lite
+ crypto-tools
+ srfi-37
+ stty
+ matchable
+ regex
+ tiger-hash
+ message-digest
+ posix-extras
+ parley
+ ssql
+ pathname-expand
+ ];
+ };
+
+ ugarit-manifest-maker = eggDerivation {
+ name = "ugarit-manifest-maker-0.1";
+
+ src = fetchegg {
+ name = "ugarit-manifest-maker";
+ version = "0.1";
+ sha256 = "1jv8lhn4s5a3qphqd3zfwl1py0m5cmqj1h55ys0935m5f422547q";
+ };
+
+ buildInputs = [
+ matchable
+ srfi-37
+ fnmatch
+ miscmacros
+ ugarit
+ numbers
+ ];
+ };
+
+ variable-item = eggDerivation {
+ name = "variable-item-1.3.1";
+
+ src = fetchegg {
+ name = "variable-item";
+ version = "1.3.1";
+ sha256 = "19b3mhb8kr892sz9yyzq79l0vv28dgilw9cf415kj6aq16yp4d5n";
+ };
+
+ buildInputs = [
+ setup-helper
+ check-errors
+ ];
+ };
+}
+
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit/default.nix
new file mode 100644
index 000000000000..bc69662dc2bd
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit/default.nix
@@ -0,0 +1,41 @@
+{ pkgs, stdenv, eggDerivation, fetchegg }:
+let
+ eggs = import ./eggs.nix { inherit eggDerivation fetchegg; };
+in with pkgs; eggDerivation rec {
+ pname = "ugarit";
+ version = "2.0";
+ name = "${pname}-${version}";
+
+ src = fetchegg {
+ inherit version;
+ name = pname;
+ sha256 = "1l5zkr6b8l5dw9p5mimbva0ncqw1sbvp3d4cywm1hqx2m03a0f1n";
+ };
+
+ buildInputs = with eggs; [
+ aes
+ crypto-tools
+ matchable
+ message-digest
+ miscmacros
+ parley
+ pathname-expand
+ posix-extras
+ regex
+ sha2
+ sql-de-lite
+ srfi-37
+ ssql
+ stty
+ tiger-hash
+ z3
+ ];
+
+ meta = with stdenv.lib; {
+ homepage = "https://www.kitten-technologies.co.uk/project/ugarit/";
+ description = "A backup/archival system based around content-addressible storage";
+ license = licenses.bsd3;
+ maintainers = [ maintainers.ebzzry ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit/eggs.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit/eggs.nix
new file mode 100644
index 000000000000..fe958cb55cc6
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/ugarit/eggs.nix
@@ -0,0 +1,486 @@
+{ eggDerivation, fetchegg }:
+rec {
+ aes = eggDerivation {
+ name = "aes-1.5";
+
+ src = fetchegg {
+ name = "aes";
+ version = "1.5";
+ sha256 = "0gjlvz5nk0fnaclljpyfk21rkf0nidjj6wcv3jbnpmfafgjny5fi";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ blob-utils = eggDerivation {
+ name = "blob-utils-1.0.3";
+
+ src = fetchegg {
+ name = "blob-utils";
+ version = "1.0.3";
+ sha256 = "17vdn02fnxnjx5ixgqimln93lqvzyq4y9w02fw7xnbdcjzqm0xml";
+ };
+
+ buildInputs = [
+ setup-helper
+ string-utils
+ ];
+ };
+
+ check-errors = eggDerivation {
+ name = "check-errors-1.13.0";
+
+ src = fetchegg {
+ name = "check-errors";
+ version = "1.13.0";
+ sha256 = "12a0sn82n98jybh72zb39fdddmr5k4785xglxb16750fhy8rmjwi";
+ };
+
+ buildInputs = [
+ setup-helper
+ ];
+ };
+
+ crypto-tools = eggDerivation {
+ name = "crypto-tools-1.3";
+
+ src = fetchegg {
+ name = "crypto-tools";
+ version = "1.3";
+ sha256 = "0442wly63zis19vh8xc9nhxgp9sabaccxylpzmchd5f1d48iag65";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ foreigners = eggDerivation {
+ name = "foreigners-1.4.1";
+
+ src = fetchegg {
+ name = "foreigners";
+ version = "1.4.1";
+ sha256 = "07nvyadhkd52q0kkvch1a5d7ivpmrhmyg295s4mxb1nw4wz46gfz";
+ };
+
+ buildInputs = [
+ matchable
+ ];
+ };
+
+ lookup-table = eggDerivation {
+ name = "lookup-table-1.13.5";
+
+ src = fetchegg {
+ name = "lookup-table";
+ version = "1.13.5";
+ sha256 = "1nzly6rhynawlvzlyilk8z8cxz57cf9n5iv20glkhh28pz2izmrb";
+ };
+
+ buildInputs = [
+ setup-helper
+ check-errors
+ miscmacros
+ record-variants
+ synch
+ ];
+ };
+
+ lru-cache = eggDerivation {
+ name = "lru-cache-0.5.3";
+
+ src = fetchegg {
+ name = "lru-cache";
+ version = "0.5.3";
+ sha256 = "0z6g3106c4j21v968hfzy9nnbfq2d83y0nyd20aifpq4g55c0d40";
+ };
+
+ buildInputs = [
+ record-variants
+ ];
+ };
+
+ matchable = eggDerivation {
+ name = "matchable-3.3";
+
+ src = fetchegg {
+ name = "matchable";
+ version = "3.3";
+ sha256 = "07y3lpzgm4djiwi9y2adc796f9kwkmdr28fkfkw65syahdax8990";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ message-digest = eggDerivation {
+ name = "message-digest-3.1.0";
+
+ src = fetchegg {
+ name = "message-digest";
+ version = "3.1.0";
+ sha256 = "1w6bax19dwgih78vcimiws0rja7qsd8hmbm6qqg2hf9cw3vab21s";
+ };
+
+ buildInputs = [
+ setup-helper
+ miscmacros
+ check-errors
+ variable-item
+ blob-utils
+ string-utils
+ ];
+ };
+
+ miscmacros = eggDerivation {
+ name = "miscmacros-2.96";
+
+ src = fetchegg {
+ name = "miscmacros";
+ version = "2.96";
+ sha256 = "1ajdgjrni10i2hmhcp4rawnxajjxry3kmq1krdmah4sf0kjrgajc";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ parley = eggDerivation {
+ name = "parley-0.9.2";
+
+ src = fetchegg {
+ name = "parley";
+ version = "0.9.2";
+ sha256 = "1vsbx4dk1240gzq02slzmavd1jrq04qj7ssnvg15h8xh81xwhbbz";
+ };
+
+ buildInputs = [
+ stty
+ srfi-71
+ miscmacros
+ ];
+ };
+
+ pathname-expand = eggDerivation {
+ name = "pathname-expand-0.1";
+
+ src = fetchegg {
+ name = "pathname-expand";
+ version = "0.1";
+ sha256 = "14llya7l04z49xpi3iylk8aglrw968vy304ymavhhqlyzmzwkx3g";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ posix-extras = eggDerivation {
+ name = "posix-extras-0.1.6";
+
+ src = fetchegg {
+ name = "posix-extras";
+ version = "0.1.6";
+ sha256 = "0gnmhn2l0161ham7f8i0lx1ay94ap8l8l7ga4nw9qs86lk024abi";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ record-variants = eggDerivation {
+ name = "record-variants-0.5.1";
+
+ src = fetchegg {
+ name = "record-variants";
+ version = "0.5.1";
+ sha256 = "15wgysxkm8m4hx9nhhw9akchzipdnqc7yj3qd3zn0z7sxg4sld1h";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ regex = eggDerivation {
+ name = "regex-1.0";
+
+ src = fetchegg {
+ name = "regex";
+ version = "1.0";
+ sha256 = "1z9bh7xvab6h5cdlsz8jk02pv5py1i6ryqarbcs3wdgkkjgmmkif";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ setup-helper = eggDerivation {
+ name = "setup-helper-1.5.5";
+
+ src = fetchegg {
+ name = "setup-helper";
+ version = "1.5.5";
+ sha256 = "1lpplp8f2wyc486dd98gs4wl1kkhh1cs6vdqkxrdk7f92ikmwbx3";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ sha2 = eggDerivation {
+ name = "sha2-3.1.0";
+
+ src = fetchegg {
+ name = "sha2";
+ version = "3.1.0";
+ sha256 = "01ch290f2kcv1yv8spjdaqwipl80vvgpqc4divsj3vxckvgkawq2";
+ };
+
+ buildInputs = [
+ message-digest
+ ];
+ };
+
+ sql-de-lite = eggDerivation {
+ name = "sql-de-lite-0.6.6";
+
+ src = fetchegg {
+ name = "sql-de-lite";
+ version = "0.6.6";
+ sha256 = "1mh3hpsibq2gxcpjaycqa4ckznj268xpfzsa6pn0i6iac6my3qra";
+ };
+
+ buildInputs = [
+ lru-cache
+ foreigners
+ ];
+ };
+
+ srfi-37 = eggDerivation {
+ name = "srfi-37-1.3.1";
+
+ src = fetchegg {
+ name = "srfi-37";
+ version = "1.3.1";
+ sha256 = "1a2zdkdzrv15fw9dfdy8067fsgh4kr8ppffm8mc3cmlczrrd58cb";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ srfi-71 = eggDerivation {
+ name = "srfi-71-1.1";
+
+ src = fetchegg {
+ name = "srfi-71";
+ version = "1.1";
+ sha256 = "01mlaxw2lfczykmx69xki2s0f4ywlg794rl4kz07plvzn0s3fbqq";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ ssql = eggDerivation {
+ name = "ssql-0.2.4";
+
+ src = fetchegg {
+ name = "ssql";
+ version = "0.2.4";
+ sha256 = "0qhnghhx1wrvav4s7l780mspwlh8s6kzq4bl0cslwp1km90fx9bk";
+ };
+
+ buildInputs = [
+ matchable
+ ];
+ };
+
+ string-utils = eggDerivation {
+ name = "string-utils-1.2.4";
+
+ src = fetchegg {
+ name = "string-utils";
+ version = "1.2.4";
+ sha256 = "07alvghg0dahilrm4jg44bndl0x69sv1zbna9l20cbdvi35i0jp1";
+ };
+
+ buildInputs = [
+ setup-helper
+ miscmacros
+ lookup-table
+ check-errors
+ ];
+ };
+
+ stty = eggDerivation {
+ name = "stty-0.2.6";
+
+ src = fetchegg {
+ name = "stty";
+ version = "0.2.6";
+ sha256 = "09jmjpdsd3yg6d0f0imcihmn49i28x09lgl60i2dllffs25k22s4";
+ };
+
+ buildInputs = [
+ setup-helper
+ foreigners
+ ];
+ };
+
+ synch = eggDerivation {
+ name = "synch-2.1.2";
+
+ src = fetchegg {
+ name = "synch";
+ version = "2.1.2";
+ sha256 = "1m9mnbq0m5jsxmd1a3rqpwpxj0l1b7vn1fknvxycc047pmlcyl00";
+ };
+
+ buildInputs = [
+ setup-helper
+ check-errors
+ ];
+ };
+
+ tiger-hash = eggDerivation {
+ name = "tiger-hash-3.1.0";
+
+ src = fetchegg {
+ name = "tiger-hash";
+ version = "3.1.0";
+ sha256 = "0j9dsbjp9cw0y4w4srg0qwgh53jw2v3mx4y4h040ds0fkxlzzknx";
+ };
+
+ buildInputs = [
+ message-digest
+ ];
+ };
+
+ ugarit = eggDerivation {
+ name = "ugarit-2.0";
+
+ src = fetchegg {
+ name = "ugarit";
+ version = "2.0";
+ sha256 = "1l5zkr6b8l5dw9p5mimbva0ncqw1sbvp3d4cywm1hqx2m03a0f1n";
+ };
+
+ buildInputs = [
+ miscmacros
+ sql-de-lite
+ crypto-tools
+ srfi-37
+ stty
+ matchable
+ regex
+ tiger-hash
+ message-digest
+ posix-extras
+ parley
+ ssql
+ pathname-expand
+ ];
+ };
+
+ variable-item = eggDerivation {
+ name = "variable-item-1.3.1";
+
+ src = fetchegg {
+ name = "variable-item";
+ version = "1.3.1";
+ sha256 = "19b3mhb8kr892sz9yyzq79l0vv28dgilw9cf415kj6aq16yp4d5n";
+ };
+
+ buildInputs = [
+ setup-helper
+ check-errors
+ ];
+ };
+
+ bind = eggDerivation {
+ name = "bind-1.5.2";
+
+ src = fetchegg {
+ name = "bind";
+ version = "1.5.2";
+ sha256 = "1x768k7dlfmkvgaf2idiaaqqgnqdnif5yb7ib6a6zndacbwz9jps";
+ };
+
+ buildInputs = [
+ silex
+ matchable
+ coops
+ regex
+ make
+ ];
+ };
+
+ coops = eggDerivation {
+ name = "coops-1.93";
+
+ src = fetchegg {
+ name = "coops";
+ version = "1.93";
+ sha256 = "0mrkk7pmn9r691svzm4113mn0xsk36zi3f15m86n29a6c7897php";
+ };
+
+ buildInputs = [
+ matchable
+ record-variants
+ ];
+ };
+
+ make = eggDerivation {
+ name = "make-1.8";
+
+ src = fetchegg {
+ name = "make";
+ version = "1.8";
+ sha256 = "1w6xsjyapi2x8dv21dpidkyw1kjfsbasddn554xx561pi3i0yv9h";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ silex = eggDerivation {
+ name = "silex-1.4";
+
+ src = fetchegg {
+ name = "silex";
+ version = "1.4";
+ sha256 = "17x7f07aa3qnay3bhjr7knjivhycs54j97jyv3gjs1h8qnp63g00";
+ };
+
+ buildInputs = [
+
+ ];
+ };
+
+ z3 = eggDerivation {
+ name = "z3-1.44";
+
+ src = fetchegg {
+ name = "z3";
+ version = "1.44";
+ sha256 = "16ayp4zkgm332q4bmjj22acqg197aqp6d8ifyyjj205iv6k0f3x4";
+ };
+
+ buildInputs = [
+ bind
+ ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/wal-e/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/wal-e/default.nix
new file mode 100644
index 000000000000..af1506bff6e9
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/wal-e/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, pythonPackages, lzop, postgresql, pv }:
+
+pythonPackages.buildPythonApplication rec {
+ pname = "wal-e";
+ version = "0.6.10";
+
+ namePrefix = "";
+
+ src = fetchurl {
+ url = "https://github.com/wal-e/wal-e/archive/v${version}.tar.gz";
+ sha256 = "1hms24xz7wx3b91vv56fhcc3j0cszwqwnmwhka4yl90202hvdir2";
+ };
+
+ # needs tox
+ doCheck = false;
+
+ propagatedBuildInputs = [
+ pythonPackages.boto
+ pythonPackages.gevent
+ postgresql
+ lzop
+ pv
+ ];
+
+ meta = {
+ description = "A Postgres WAL-shipping disaster recovery and replication toolkit";
+ homepage = "https://github.com/wal-e/wal-e";
+ maintainers = [];
+ license = stdenv.lib.licenses.bsd3;
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/wal-g/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/wal-g/default.nix
new file mode 100644
index 000000000000..85a6b169f745
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/wal-g/default.nix
@@ -0,0 +1,32 @@
+{ lib, buildGoModule, fetchFromGitHub, brotli }:
+
+buildGoModule rec {
+ pname = "wal-g";
+ version = "0.2.17";
+
+ src = fetchFromGitHub {
+ owner = "wal-g";
+ repo = "wal-g";
+ rev = "v${version}";
+ sha256 = "0r6vy2b3xqwa22286srwngk63sq4aza6aj7brwc130vypcps7svp";
+ };
+
+ vendorSha256 = "0r73l4kxzldca1vg5mshq6iqsxcrndcbmbp3d7i9pxyb2kig8gv5";
+
+ buildInputs = [ brotli ];
+
+ subPackages = [ "main/pg" ];
+
+ buildFlagsArray = [ "-ldflags=-s -w -X github.com/wal-g/wal-g/cmd/pg.WalgVersion=${version} -X github.com/wal-g/wal-g/cmd/pg.GitRevision=${src.rev}" ];
+
+ postInstall = ''
+ mv $out/bin/pg $out/bin/wal-g
+ '';
+
+ meta = with lib; {
+ homepage = "https://github.com/wal-g/wal-g";
+ license = licenses.asl20;
+ description = "An archival restoration tool for PostgreSQL";
+ maintainers = with maintainers; [ ocharles marsam ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/zbackup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/zbackup/default.nix
new file mode 100644
index 000000000000..5de58c56f002
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/zbackup/default.nix
@@ -0,0 +1,17 @@
+{ stdenv, fetchurl, cmake, zlib, openssl, protobuf, protobufc, lzo, libunwind } :
+stdenv.mkDerivation {
+ pname = "zbackup";
+ version = "1.4.4";
+ src = fetchurl {
+ url = "https://github.com/zbackup/zbackup/archive/1.4.4.tar.gz";
+ sha256 = "11csla7n44lg7x6yqg9frb21vnkr8cvnh6ardibr3nj5l39crk7g";
+ };
+ buildInputs = [ zlib openssl protobuf lzo libunwind ];
+ nativeBuildInputs = [ cmake protobufc ];
+ meta = {
+ description = "A versatile deduplicating backup tool";
+ homepage = "http://zbackup.org/";
+ platforms = stdenv.lib.platforms.linux;
+ license = stdenv.lib.licenses.gpl2Plus;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/zfs-prune-snapshots/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfs-prune-snapshots/default.nix
new file mode 100644
index 000000000000..434c86b343a8
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfs-prune-snapshots/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, go-md2man }:
+
+stdenv.mkDerivation rec {
+ version = "1.1.0";
+ pname = "zfs-prune-snapshots";
+
+ src = fetchFromGitHub {
+ owner = "bahamas10";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "09dz9v6m47dxfvfncz0k926dqfhagm87kd33dcw66cbw15ac3spx";
+ };
+
+ nativeBuildInputs = [ go-md2man ];
+
+ makeTargets = [ "man" ];
+
+ installPhase = ''
+ install -m 755 -D zfs-prune-snapshots $out/bin/zfs-prune-snapshots
+ install -m 644 -D man/zfs-prune-snapshots.1 $out/share/man/man1/zfs-prune-snapshots.1
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Remove snapshots from one or more zpools that match given criteria";
+ homepage = "https://github.com/bahamas10/zfs-prune-snapshots";
+ license = licenses.mit;
+ maintainers = [ maintainers.ymarkus ];
+ platforms = platforms.all;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/zfs-replicate/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfs-replicate/default.nix
new file mode 100644
index 000000000000..ff2f6062554f
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfs-replicate/default.nix
@@ -0,0 +1,42 @@
+{ buildPythonApplication, click, fetchPypi, hypothesis, mypy, pytest
+, pytestcov, pytestrunner, stdenv, stringcase
+}:
+
+buildPythonApplication rec {
+ pname = "zfs-replicate";
+ version = "1.1.14";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0iqyk6q112ylcqrhrgvgbgqqvaikhwk0sb5kc7kg2wwqdc9rfwys";
+ };
+
+ checkInputs = [
+ hypothesis
+ mypy
+ pytest
+ pytestcov
+ ];
+
+ buildInputs = [
+ pytestrunner
+ ];
+
+ propagatedBuildInputs = [
+ click
+ stringcase
+ ];
+
+ doCheck = true;
+
+ checkPhase = ''
+ pytest --doctest-modules
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://github.com/alunduil/zfs-replicate";
+ description = "ZFS Snapshot Replication";
+ license = licenses.bsd2;
+ maintainers = with maintainers; [ alunduil ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/zfsbackup/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfsbackup/default.nix
new file mode 100644
index 000000000000..7b3cbdeaa103
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfsbackup/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+ pname = "zfsbackup";
+ version = "unstable-2019-03-05";
+ rev = "78fea6e99f0a5a4c8513d3a3d1d45fb6750cfddf";
+
+ goPackagePath = "github.com/someone1/zfsbackup-go";
+
+ src = fetchFromGitHub {
+ owner = "someone1";
+ repo = "zfsbackup-go";
+ inherit rev;
+ sha256 = "0yalsfvzmcnc8yfzm3r5dikqrp57spwa16l7gbzvgqqcz4vlnw3n";
+ };
+
+ goDeps = ./deps.nix;
+
+ meta = with lib; {
+ description = "Backup ZFS snapshots to cloud storage such as Google, Amazon, Azure, etc";
+ homepage = "https://github.com/someone1/zfsbackup-go";
+ license = licenses.mit;
+ maintainers = [ maintainers.xfix ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/zfsbackup/deps.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfsbackup/deps.nix
new file mode 100644
index 000000000000..f1fa23755bc7
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfsbackup/deps.nix
@@ -0,0 +1,273 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
+[
+ {
+ goPackagePath = "cloud.google.com/go";
+ fetch = {
+ type = "git";
+ url = "https://code.googlesource.com/gocloud";
+ rev = "b9197a057a6cb1129f29cd21ca11d1bb043666d1";
+ sha256 = "0f1p361apzj30i9vcza60ldhhjxff8581gr5xqim7x4d5rgmpwil";
+ };
+ }
+ {
+ goPackagePath = "github.com/Azure/azure-pipeline-go";
+ fetch = {
+ type = "git";
+ url = "https://github.com/Azure/azure-pipeline-go";
+ rev = "232aee85e8e3a6223a11c0943f7df2ae0fac00e4";
+ sha256 = "1agn2nzmm1dkwggm4w7h4bnrav4n5jrl0vqbqy2s49vqlr8zirn6";
+ };
+ }
+ {
+ goPackagePath = "github.com/Azure/azure-storage-blob-go";
+ fetch = {
+ type = "git";
+ url = "https://github.com/Azure/azure-storage-blob-go";
+ rev = "fc700035fe4a7020f50d49f420b3c088aed57e03";
+ sha256 = "00gsnk9s1rlrakqvcm917hn4r47jannxwp7rkhrb71pamzm46752";
+ };
+ }
+ {
+ goPackagePath = "github.com/aws/aws-sdk-go";
+ fetch = {
+ type = "git";
+ url = "https://github.com/aws/aws-sdk-go";
+ rev = "3576772d916b5db1cb5516b772bcdc362349a177";
+ sha256 = "04clzbyg5cmqz98i5hxbik6sd7aclas1707rhaixmmckgisqxb8i";
+ };
+ }
+ {
+ goPackagePath = "github.com/cenkalti/backoff";
+ fetch = {
+ type = "git";
+ url = "https://github.com/cenkalti/backoff";
+ rev = "4b4cebaf850ec58f1bb1fec5bdebdf8501c2bc3f";
+ sha256 = "0vwd6nbadrqgaljb5grmw2iljvv963qd15axr5cvvgpd465q3kzc";
+ };
+ }
+ {
+ goPackagePath = "github.com/dustin/go-humanize";
+ fetch = {
+ type = "git";
+ url = "https://github.com/dustin/go-humanize";
+ rev = "9f541cc9db5d55bce703bd99987c9d5cb8eea45e";
+ sha256 = "1kqf1kavdyvjk7f8kx62pnm7fbypn9z1vbf8v2qdh3y7z7a0cbl3";
+ };
+ }
+ {
+ goPackagePath = "github.com/golang/groupcache";
+ fetch = {
+ type = "git";
+ url = "https://github.com/golang/groupcache";
+ rev = "404acd9df4cc9859d64fb9eed42e5c026187287a";
+ sha256 = "1zmhdr758wn0kfh5xr4hg026f9qvy00s3midb5iqnpx1kh647j2g";
+ };
+ }
+ {
+ goPackagePath = "github.com/golang/protobuf";
+ fetch = {
+ type = "git";
+ url = "https://github.com/golang/protobuf";
+ rev = "1680a479a2cfb3fa22b972af7e36d0a0fde47bf8";
+ sha256 = "1w0aivn2rqf7bcpz84nbn0alh1q3nglqgp7il835fmvvc94rrkqn";
+ };
+ }
+ {
+ goPackagePath = "github.com/googleapis/gax-go";
+ fetch = {
+ type = "git";
+ url = "https://github.com/googleapis/gax-go";
+ rev = "a170e83f27ee4e20c66e51b66a99a4a349a1b75a";
+ sha256 = "0a5ir1v5cd6m40hscqy0qpc3ibd703kiw419m66ddxnkvzykvp0i";
+ };
+ }
+ {
+ goPackagePath = "github.com/juju/ratelimit";
+ fetch = {
+ type = "git";
+ url = "https://github.com/juju/ratelimit";
+ rev = "f60b32039441cd828005f82f3a54aafd00bc9882";
+ sha256 = "1qbjcm4y53awkqmpxb1nm9c1xdylc44vph4mn30qjb5wrcqy7c1r";
+ };
+ }
+ {
+ goPackagePath = "github.com/klauspost/compress";
+ fetch = {
+ type = "git";
+ url = "https://github.com/klauspost/compress";
+ rev = "30993c63e1b02b47dd3878e74c8db50833706ecc";
+ sha256 = "07d0r56ic91rdd0xvfr7zpn015kl6g9jwlgq5avczbz4fnyx5x8m";
+ };
+ }
+ {
+ goPackagePath = "github.com/klauspost/pgzip";
+ fetch = {
+ type = "git";
+ url = "https://github.com/klauspost/pgzip";
+ rev = "083b1c3f84dd6486588802e5ce295de3a7f41a8b";
+ sha256 = "0ddigh096fz3lixbdm679hjvnfivbpkijrclk5sn9091hyj38pb3";
+ };
+ }
+ {
+ goPackagePath = "github.com/kurin/blazer";
+ fetch = {
+ type = "git";
+ url = "https://github.com/kurin/blazer";
+ rev = "cf2f27cc0be3dac3c1a94c3c8b76834ce741439e";
+ sha256 = "02nwxrczg8c9zj3hdmbyg458qvhfwl60ci1pjl7f0y07kgiv1rg3";
+ };
+ }
+ {
+ goPackagePath = "github.com/mattn/go-ieproxy";
+ fetch = {
+ type = "git";
+ url = "https://github.com/mattn/go-ieproxy";
+ rev = "f9202b1cfdeb0c82ddd3dc1e8e9cd94b3c0c1b13";
+ sha256 = "0r8c17znlv32750qy3p96fbyp8ys8xfdccpzv0z9lr2y88jnzhpz";
+ };
+ }
+ {
+ goPackagePath = "github.com/miolini/datacounter";
+ fetch = {
+ type = "git";
+ url = "https://github.com/miolini/datacounter";
+ rev = "aa48df3a02c1fbcd3040271f631887991c3071fb";
+ sha256 = "12ldh5jhafjhh3jvh979mldwygkkcnm97axs7dhlai6gqwlhls87";
+ };
+ }
+ {
+ goPackagePath = "github.com/nightlyone/lockfile";
+ fetch = {
+ type = "git";
+ url = "https://github.com/nightlyone/lockfile";
+ rev = "0ad87eef1443f64d3d8c50da647e2b1552851124";
+ sha256 = "19vfswcvdy937da7w6hap3wp83drj5a084sqszy8r2ph4fbkln41";
+ };
+ }
+ {
+ goPackagePath = "github.com/op/go-logging";
+ fetch = {
+ type = "git";
+ url = "https://github.com/op/go-logging";
+ rev = "970db520ece77730c7e4724c61121037378659d9";
+ sha256 = "1cpna2x5l071z1vrnk7zipdkka8dzwsjyx7m79xk0lr08rip0kcj";
+ };
+ }
+ {
+ goPackagePath = "github.com/pkg/errors";
+ fetch = {
+ type = "git";
+ url = "https://github.com/pkg/errors";
+ rev = "27936f6d90f9c8e1145f11ed52ffffbfdb9e0af7";
+ sha256 = "0yzmgi6g4ak4q8y7w6x0n5cbinlcn8yc3gwgzy4yck00qdn25d6y";
+ };
+ }
+ {
+ goPackagePath = "github.com/spf13/cobra";
+ fetch = {
+ type = "git";
+ url = "https://github.com/spf13/cobra";
+ rev = "8a4b46fadf756f30eff047abf2f8edba4eac6fef";
+ sha256 = "0f9pxni3lghl205wrnssw58iliqifrxcdabrbww20887zwn3ki7q";
+ };
+ }
+ {
+ goPackagePath = "github.com/spf13/pflag";
+ fetch = {
+ type = "git";
+ url = "https://github.com/spf13/pflag";
+ rev = "2e9d26c8c37aae03e3f9d4e90b7116f5accb7cab";
+ sha256 = "0gpmacngd0gpslnbkzi263f5ishigzgh6pbdv9hp092rnjl4nd31";
+ };
+ }
+ {
+ goPackagePath = "go.opencensus.io";
+ fetch = {
+ type = "git";
+ url = "https://github.com/census-instrumentation/opencensus-go";
+ rev = "3b5a343282fe4b4fccdb0f24cbd1d7169d20858a";
+ sha256 = "0qzx8p019r4qzm0knvs3kcx5vc9qg6ksgf1amk5djr1h00w460aw";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/crypto";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/crypto";
+ rev = "87dc89f01550277dc22b74ffcf4cd89fa2f40f4c";
+ sha256 = "0z4i1m2yn3f31ci7wvcm2rxkx2yiv7a78mfzklncmsz2k97rlh2g";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/net";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/net";
+ rev = "da9a3fd4c5820e74b24a6cb7fb438dc9b0dd377c";
+ sha256 = "0iavs400534jn7drmdphx0f18vgg060p2r59xw5d85ji1l5rin1l";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/oauth2";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/oauth2";
+ rev = "0f29369cfe4552d0e4bcddc57cc75f4d7e672a33";
+ sha256 = "06jwpvx0x2gjn2y959drbcir5kd7vg87k0r1216abk6rrdzzrzi2";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/sync";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/sync";
+ rev = "cd5d95a43a6e21273425c7ae415d3df9ea832eeb";
+ sha256 = "1nqkyz2y1qvqcma52ijh02s8aiqmkfb95j08f6zcjhbga3ds6hds";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/sys";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/sys";
+ rev = "b09406accb4736d857a32bf9444cd7edae2ffa79";
+ sha256 = "00lbhsr2p3mi2n35mv3yy6lmgzjjav45yv9bmrxgyahbac5qnz5m";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/text";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/text";
+ rev = "3d0f7978add91030e5e8976ff65ccdd828286cba";
+ sha256 = "0iagl5icarfrbiv6m3dhqy51r30cnl07r66im5c88dz7lrvpy5z3";
+ };
+ }
+ {
+ goPackagePath = "google.golang.org/api";
+ fetch = {
+ type = "git";
+ url = "https://code.googlesource.com/google-api-go-client";
+ rev = "e6ade80c6e2a122a6588f9f827207dcb99da433e";
+ sha256 = "1mk0ab6f2dyx1lack436zdhspq1hgip2s5m3pqjrqk18s8vvn4bd";
+ };
+ }
+ {
+ goPackagePath = "google.golang.org/genproto";
+ fetch = {
+ type = "git";
+ url = "https://github.com/google/go-genproto";
+ rev = "548a555dbc03994223efbaba0090152849259498";
+ sha256 = "15sbfwrh6m18fn3n369cb5c8qsmw17wibwmjssblgp64gvmx5b18";
+ };
+ }
+ {
+ goPackagePath = "google.golang.org/grpc";
+ fetch = {
+ type = "git";
+ url = "https://github.com/grpc/grpc-go";
+ rev = "7c8e60372e19da88fb3fe8ac6a8de781eef7f547";
+ sha256 = "03fb7j1gfglzp77hkhlm8dgg3if1j1pvry0nhx915ww0hmz6sr00";
+ };
+ }
+]
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/zfsnap/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfsnap/default.nix
new file mode 100644
index 000000000000..89d7414246c4
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/zfsnap/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, coreutils, installShellFiles }:
+
+stdenv.mkDerivation rec {
+ version = "2.0.0-beta3";
+ pname = "zfsnap";
+
+ src = fetchFromGitHub {
+ owner = "zfsnap";
+ repo = "zfsnap";
+ rev = "v${version}";
+ sha256 = "0670a5sghvqx32c9gfsird15mg9nqcvwxsrfcjrwc0sj7br9bd2g";
+ };
+
+ nativeBuildInputs = [ installShellFiles ];
+
+ postPatch = ''
+ # Use zfs binaries from PATH, because often the zfs package from nixpkgs is
+ # not the one that should be used
+ substituteInPlace share/zfsnap/core.sh \
+ --replace "ZFS_CMD='/sbin/zfs'" "ZFS_CMD='zfs'" \
+ --replace "ZPOOL_CMD='/sbin/zpool'" "ZPOOL_CMD='zpool'"
+
+ substituteInPlace sbin/zfsnap.sh \
+ --replace "/bin/ls" "${coreutils}/bin/ls"
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin
+ mv sbin/zfsnap.sh $out/bin/zfsnap
+ mv share $out
+ installManPage man/*/*
+ installShellCompletion completion/*.{bash,zsh}
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A portable, performant script to make rolling ZFS snapshots easy";
+ homepage = "https://github.com/zfsnap/zfsnap";
+ license = licenses.bsd3;
+ maintainers = with maintainers; [ woffs ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/backup/znapzend/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/backup/znapzend/default.nix
new file mode 100644
index 000000000000..5ca460beb3be
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/backup/znapzend/default.nix
@@ -0,0 +1,87 @@
+{ stdenv, fetchFromGitHub, fetchurl, perl, perlPackages, wget, autoconf, automake, autoreconfHook }:
+
+let
+ # when upgrade znapzend, check versions of Perl libs here: https://github.com/oetiker/znapzend/blob/master/cpanfile
+ # pinned versions are listed at https://github.com/oetiker/znapzend/blob/master/thirdparty/cpanfile-5.26.1.snapshot
+ Mojolicious-8-35 = perlPackages.buildPerlPackage rec {
+ pname = "Mojolicious";
+ version = "8.35";
+ src = fetchurl {
+ url = "mirror://cpan/authors/id/S/SR/SRI/${pname}-${version}.tar.gz";
+ sha256 = "1bll0ahh5v1y3x0ql29klwsa68cj46wzqc385srsnn2m8kh2ak8h";
+ };
+ };
+ MojoIOLoopForkCall-0-20 = perlPackages.buildPerlModule rec {
+ pname = "Mojo-IOLoop-ForkCall";
+ version = "0.20";
+ src = fetchurl {
+ url = "mirror://cpan/authors/id/J/JB/JBERGER/${pname}-${version}.tar.gz";
+ sha256 = "19pih5x0ayxs2m8j29qwdpi6ky3w4ghv6vrmax3ix9r59hj6569b";
+ };
+ propagatedBuildInputs = [ perlPackages.IOPipely Mojolicious-8-35 ];
+ };
+
+ version = "0.20.0";
+ checksum = "15lb5qwksa508m9bj6d3n4rrjpakfaas9qxspg408bcqfp7pqjw3";
+in
+stdenv.mkDerivation {
+ pname = "znapzend";
+ inherit version;
+
+ src = fetchFromGitHub {
+ owner = "oetiker";
+ repo = "znapzend";
+ rev = "v${version}";
+ sha256 = checksum;
+ };
+
+ buildInputs = [ wget perl MojoIOLoopForkCall-0-20 perlPackages.TAPParserSourceHandlerpgTAP ];
+
+ nativeBuildInputs = [ autoconf automake autoreconfHook ];
+
+ preConfigure = ''
+ sed -i 's/^SUBDIRS =.*$/SUBDIRS = lib/' Makefile.am
+
+ grep -v thirdparty/Makefile configure.ac > configure.ac.tmp
+ mv configure.ac.tmp configure.ac
+
+ autoconf
+ '';
+
+ preBuild = ''
+ aclocal
+ automake
+ '';
+
+ postInstall = ''
+ substituteInPlace $out/bin/znapzend --replace "${perl}/bin/perl" \
+ "${perl}/bin/perl \
+ -I${Mojolicious-8-35}/${perl.libPrefix} \
+ -I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
+ -I${MojoIOLoopForkCall-0-20}/${perl.libPrefix} \
+ -I${perlPackages.IOPipely}/${perl.libPrefix} \
+ "
+ substituteInPlace $out/bin/znapzendzetup --replace "${perl}/bin/perl" \
+ "${perl}/bin/perl \
+ -I${Mojolicious-8-35}/${perl.libPrefix} \
+ -I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
+ -I${MojoIOLoopForkCall-0-20}/${perl.libPrefix} \
+ -I${perlPackages.IOPipely}/${perl.libPrefix} \
+ "
+ substituteInPlace $out/bin/znapzendztatz --replace "${perl}/bin/perl" \
+ "${perl}/bin/perl \
+ -I${Mojolicious-8-35}/${perl.libPrefix} \
+ -I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
+ -I${MojoIOLoopForkCall-0-20}/${perl.libPrefix} \
+ -I${perlPackages.IOPipely}/${perl.libPrefix} \
+ "
+ '';
+
+ meta = with stdenv.lib; {
+ description = "High performance open source ZFS backup with mbuffer and ssh support";
+ homepage = "http://www.znapzend.org";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ otwieracz ];
+ platforms = platforms.all;
+ };
+}