uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,39 @@
{ stdenv
, lib
, fetchurl
, makeWrapper
, jre
}:
stdenv.mkDerivation rec {
pname = "android-backup-extractor";
version = "20210909062443-4c55371";
src = fetchurl {
url = "https://github.com/nelenkov/android-backup-extractor/releases/download/${version}/abe.jar";
sha256 = "0ms241kb4h9y9apr637sb4kw5mml40c1ac0q4jcxhnwr3dr05w1q";
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
runHook preInstall
install -D $src $out/lib/android-backup-extractor/abe.jar
makeWrapper ${jre}/bin/java $out/bin/abe --add-flags "-cp $out/lib/android-backup-extractor/abe.jar org.nick.abe.Main"
runHook postInstall
'';
meta = with lib; {
description = "Utility to extract and repack Android backups created with adb backup";
homepage = "https://github.com/nelenkov/android-backup-extractor";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
maintainers = with maintainers; [ prusnak ];
};
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper, mariadb, mailutils, pbzip2, pigz, bzip2, gzip }:
stdenv.mkDerivation rec {
pname = "automysqlbackup";
version = "3.0.7";
src = fetchFromGitHub {
owner = "sixhop";
repo = pname;
rev = version;
sha256 = "sha256-C0p1AY4yIxybQ6a/HsE3ZTHumtvQw5kKM51Ap+Se0ZI=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin $out/etc
cp automysqlbackup $out/bin/
cp automysqlbackup.conf $out/etc/
wrapProgram $out/bin/automysqlbackup --prefix PATH : ${lib.makeBinPath [ mariadb mailutils pbzip2 pigz bzip2 gzip ]}
'';
meta = with lib; {
description = "A script to run daily, weekly and monthly backups for your MySQL database";
homepage = "https://github.com/sixhop/AutoMySQLBackup";
platforms = platforms.linux;
maintainers = [ maintainers.aanderse ];
license = licenses.gpl2Plus;
};
}

View file

@ -0,0 +1,32 @@
{ lib, fetchFromGitHub, installShellFiles, buildGoModule }:
buildGoModule rec {
pname = "autorestic";
version = "1.7.1";
src = fetchFromGitHub {
owner = "cupcakearmy";
repo = pname;
rev = "v${version}";
sha256 = "sha256-UUK5C26wM8LKQ7TE6DWEfzq+uPXH09B2Nybkfuqk+1o=";
};
vendorSha256 = "sha256-eB24vCElnnk3EMKniCblmeRsFk0BQ0wFeBf0B8OPanE=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd autorestic \
--bash <($out/bin/autorestic completion bash) \
--fish <($out/bin/autorestic completion fish) \
--zsh <($out/bin/autorestic completion zsh)
'';
meta = with lib; {
description = "High level CLI utility for restic";
homepage = "https://github.com/cupcakearmy/autorestic";
license = licenses.asl20;
maintainers = with maintainers; [ renesat ];
mainProgram = "autorestic";
};
}

View file

@ -0,0 +1,47 @@
{ lib, stdenv, fetchurl, sqlite, postgresql, zlib, acl, ncurses, openssl, readline
, CoreFoundation, IOKit
}:
stdenv.mkDerivation rec {
pname = "bacula";
version = "11.0.6";
src = fetchurl {
url = "mirror://sourceforge/bacula/${pname}-${version}.tar.gz";
sha256 = "sha256-AZWgi81PV4rkqc4Nkff4ZzHGNNVrgQU0ci1yGyqe7Lc=";
};
buildInputs = [ postgresql sqlite zlib ncurses openssl readline ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
CoreFoundation
IOKit
]
# acl relies on attr, which I can't get to build on darwin
++ 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"
] ++ 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 lib; {
description = "Enterprise ready, Network Backup Tool";
homepage = "http://bacula.org/";
license = with licenses; [ agpl3Only bsd2 ];
maintainers = with maintainers; [ lovek323 eleanor ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "bakelite";
version = "unstable-2022-02-12";
src = fetchFromGitHub {
owner = "richfelker";
repo = pname;
rev = "373901734d114e42aa385e6a7843745674e4ca08";
hash = "sha256-HBnYlUyTkvPTbdsZD02yCq5C7yXOHYK4l4mDRUkcN5I=";
};
hardeningEnable = [ "pie" ];
preBuild = ''
# pipe2() is only exposed with _GNU_SOURCE
# Upstream makefile explicitly uses -O3 to improve SHA-3 performance
makeFlagsArray+=( CFLAGS="-D_GNU_SOURCE -g -O3" )
'';
installPhase = ''
mkdir -p $out/bin
cp bakelite $out/bin
'';
meta = with lib; {
homepage = "https://github.com/richfelker/bakelite";
description = "Incremental backup with strong cryptographic confidentality";
license = licenses.gpl2;
maintainers = with maintainers; [ mvs ];
# no support for Darwin (yet: https://github.com/richfelker/bakelite/pull/5)
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,40 @@
{ lib, stdenv, fetchFromGitHub
, openssl
, pandoc
, which
}:
stdenv.mkDerivation rec {
pname = "bdsync";
version = "0.11.2";
src = fetchFromGitHub {
owner = "rolffokkens";
repo = pname;
rev = "v${version}";
sha256 = "0kx422cp1bxr62i1mi7dzrpwmys1kdp865rcymdp4knb5rr5864k";
};
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 lib; {
description = "Fast block device synchronizing tool";
homepage = "https://github.com/TargetHolding/bdsync";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ jluttine ];
};
}

View file

@ -0,0 +1,132 @@
{ lib
, stdenv
, acl
, e2fsprogs
, libb2
, lz4
, openssh
, openssl
, python3
, zstd
, nixosTests
}:
python3.pkgs.buildPythonApplication rec {
pname = "borgbackup";
version = "1.2.1";
format = "pyproject";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-n5zi0ZI8szoUfubQgXfYYJdFZ3IbEUL8pnkUoC5kxjM=";
};
postPatch = ''
# sandbox does not support setuid/setgid/sticky bits
substituteInPlace src/borg/testsuite/archiver.py \
--replace "0o4755" "0o0755"
'';
nativeBuildInputs = with python3.pkgs; [
cython
setuptools-scm
# For building documentation:
sphinx
guzzle_sphinx_theme
];
buildInputs = [
libb2
lz4
zstd
openssl
] ++ lib.optionals stdenv.isLinux [
acl
];
propagatedBuildInputs = with python3.pkgs; [
msgpack
packaging
(if stdenv.isLinux then pyfuse3 else llfuse)
];
preConfigure = ''
export BORG_OPENSSL_PREFIX="${openssl.dev}"
export BORG_LZ4_PREFIX="${lz4.dev}"
export BORG_LIBB2_PREFIX="${libb2}"
export BORG_LIBZSTD_PREFIX="${zstd.dev}"
'';
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; [
e2fsprogs
python-dateutil
pytest-benchmark
pytest-xdist
pytestCheckHook
];
pytestFlagsArray = [
"--benchmark-skip"
"--pyargs" "borg.testsuite"
];
disabledTests = [
# fuse: device not found, try 'modprobe fuse' first
"test_fuse"
"test_fuse_allow_damaged_files"
"test_fuse_mount_hardlinks"
"test_fuse_mount_options"
"test_fuse_versions_view"
"test_migrate_lock_alive"
"test_readonly_mount"
# Error: Permission denied while trying to write to /var/{,tmp}
"test_get_cache_dir"
"test_get_keys_dir"
"test_get_security_dir"
"test_get_config_dir"
# https://github.com/borgbackup/borg/issues/6573
"test_basic_functionality"
];
preCheck = ''
export HOME=$TEMP
'';
passthru.tests = {
inherit (nixosTests) borgbackup;
};
outputs = [ "out" "doc" ];
meta = with 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
mainProgram = "borg";
maintainers = with maintainers; [ flokli dotlambda globin ];
};
}

View file

@ -0,0 +1,46 @@
{ borgbackup, coreutils, lib, python3Packages, systemd }:
python3Packages.buildPythonApplication rec {
pname = "borgmatic";
version = "1.5.18";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "sha256-dX1U1zza8zMhDiTLE+DgtN6RLRciLks4NDOukpKH/po=";
};
checkInputs = with python3Packages; [ flexmock pytestCheckHook pytest-cov ];
# - test_borgmatic_version_matches_news_version
# The file NEWS not available on the pypi source, and this test is useless
disabledTests = [
"test_borgmatic_version_matches_news_version"
];
propagatedBuildInputs = with python3Packages; [
borgbackup
colorama
jsonschema
ruamel-yaml
requests
setuptools
];
postInstall = ''
mkdir -p $out/lib/systemd/system
cp sample/systemd/borgmatic.timer $out/lib/systemd/system/
substitute sample/systemd/borgmatic.service \
$out/lib/systemd/system/borgmatic.service \
--replace /root/.local/bin/borgmatic $out/bin/borgmatic \
--replace systemd-inhibit ${systemd}/bin/systemd-inhibit \
--replace sleep ${coreutils}/bin/sleep
'';
meta = with lib; {
description = "Simple, configuration-driven backup software for servers and workstations";
homepage = "https://torsion.org/borgmatic/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ imlonghao ];
};
}

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchurl, fetchpatch, librsync }:
stdenv.mkDerivation rec {
pname = "btar";
version = "1.1.1";
src = fetchurl {
url = "https://vicerveza.homeunix.net/~viric/soft/btar/btar-${version}.tar.gz";
sha256 = "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd";
};
patches = [
(fetchpatch {
url = "https://build.opensuse.org/public/source/openSUSE:Factory/btar/btar-librsync.patch?rev=2";
sha256 = "1awqny9489vsfffav19s73xxg26m7zrhvsgf1wxb8c2izazwr785";
})
];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: listindex.o:/build/btar-1.1.1/loadindex.h:12: multiple definition of
# `ptr'; main.o:/build/btar-1.1.1/loadindex.h:12: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
buildInputs = [ librsync ];
makeFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
description = "Tar-compatible block-based archiver";
license = lib.licenses.gpl3Plus;
homepage = "https://viric.name/cgi-bin/btar";
platforms = platforms.all;
maintainers = with maintainers; [ viric ];
};
}

View file

@ -0,0 +1,73 @@
{ lib
, stdenv
, fetchurl
, bash
, btrfs-progs
, openssh
, perl
, perlPackages
, util-linux
, asciidoctor
, mbuffer
, makeWrapper
, genericUpdater
, curl
, writeShellScript
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "btrbk";
version = "0.32.1";
src = fetchurl {
url = "https://digint.ch/download/btrbk/releases/${pname}-${version}.tar.xz";
sha256 = "flQf1KTybPImDoD+iNe+P+u1rOiYxXjQoltuGPWuX3g=";
};
nativeBuildInputs = [ 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" \
--replace "\$0" "\$ENV{'program_name'}"
# Fix SSH filter script
sed -i '/^export PATH/d' ssh_filter_btrbk.sh
substituteInPlace ssh_filter_btrbk.sh --replace logger ${util-linux}/bin/logger
'';
preFixup = ''
wrapProgram $out/bin/btrbk \
--set PERL5LIB $PERL5LIB \
--run 'export program_name=$0' \
--prefix PATH ':' "${lib.makeBinPath [ btrfs-progs bash mbuffer openssh ]}"
'';
passthru.tests.btrbk = nixosTests.btrbk;
passthru.updateScript = genericUpdater {
inherit pname version;
versionLister = writeShellScript "btrbk-versionLister" ''
echo "# Versions for $1:" >> "$2"
${curl}/bin/curl -s https://digint.ch/download/btrbk/releases/ | ${perl}/bin/perl -lne 'print $1 if /btrbk-([0-9.]*)\.tar/'
'';
};
meta = with lib; {
description = "A backup tool for btrfs subvolumes";
homepage = "https://digint.ch/btrbk";
license = licenses.gpl3Only;
platforms = platforms.unix;
maintainers = with maintainers; [ asymmetric ];
};
}

View file

@ -0,0 +1,65 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper
, perl, pandoc, python3Packages, git
, par2cmdline ? null, par2Support ? true
}:
assert par2Support -> par2cmdline != null;
let version = "0.32"; in
with lib;
stdenv.mkDerivation {
pname = "bup";
inherit version;
src = fetchFromGitHub {
repo = "bup";
owner = "bup";
rev = version;
sha256 = "sha256-SWnEJ5jwu/Jr2NLsTS8ajWay0WX/gYbOc3J6w00DndI=";
};
buildInputs = [
git
(python3Packages.python.withPackages
(p: with p; [ setuptools tornado ]
++ lib.optionals (!stdenv.isDarwin) [ pyxattr pylibacl fuse ]))
];
nativeBuildInputs = [ pandoc perl makeWrapper ];
postPatch = ''
patchShebangs .
substituteInPlace Makefile --replace "-Werror" ""
'' + 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 ];
};
}

View file

@ -0,0 +1,37 @@
{ stdenv, lib, fetchFromGitHub, installShellFiles, rustPlatform, ronn, pkg-config, libsodium }:
rustPlatform.buildRustPackage rec {
pname = "bupstash";
version = "0.11.0";
src = fetchFromGitHub {
owner = "andrewchambers";
repo = pname;
rev = "v${version}";
sha256 = "sha256-9yWQQ8uzDkN3Pi2OiEn+oEazc3nH53dF2GswBCu8d3c=";
};
cargoSha256 = "sha256-JAclSUFuQk768cgDEvG1rxux2xBGHl1d/NAoxw161YU=";
nativeBuildInputs = [ ronn pkg-config installShellFiles ];
buildInputs = [ libsodium ];
postBuild = ''
RUBYOPT="-KU -E utf-8:utf-8" ronn -r doc/man/*.md
'';
postInstall = ''
installManPage doc/man/*.[1-9]
'';
meta = with lib; {
description = "Easy and efficient encrypted backups";
homepage = "https://bupstash.io";
license = licenses.mit;
platforms = platforms.unix;
# = note: Undefined symbols for architecture x86_64:
# "_utimensat", referenced from:
# https://github.com/NixOS/nixpkgs/issues/101229
broken = (stdenv.isDarwin && stdenv.isx86_64);
maintainers = with maintainers; [ andrewchambers ];
};
}

View file

@ -0,0 +1,39 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config
, 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";
};
patches = [
# Pull upstream fix for ncurses-6.3 support
(fetchpatch {
name = "ncurses-6.3.patch";
url = "https://github.com/grke/burp/commit/1d6c931af7c11f164cf7ad3479781e8f03413496.patch";
sha256 = "14sfbfahlankz3xg6v10i8fnmpnmqpp73q9xm0l0hnjh25igv6bl";
})
];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ librsync ncurses openssl zlib uthash ]
++ lib.optional (!stdenv.isDarwin) acl;
configureFlags = [ "--localstatedir=/var" ];
installFlags = [ "localstatedir=/tmp" ];
meta = with lib; {
description = "BURP - BackUp and Restore Program";
homepage = "https://burp.grke.org";
license = licenses.agpl3;
maintainers = with maintainers; [ tokudan ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,32 @@
{ lib, 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 = lib.licenses.gpl2;
platforms = with lib.platforms; linux;
};
}

View file

@ -0,0 +1,55 @@
{ lib, stdenv, fetchurl
, which
, attr, e2fsprogs
, curl, libargon2, librsync, libthreadar
, gpgme, libgcrypt, openssl
, bzip2, lz4, lzo, xz, zlib
}:
with lib;
stdenv.mkDerivation rec {
version = "2.7.5";
pname = "dar";
src = fetchurl {
url = "mirror://sourceforge/dar/${pname}-${version}.tar.gz";
sha256 = "sha256-lfpJOomadV/oTJsOloH1rYF5Wy3kVr+EBUvqZ+xaCWY=";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ which ];
buildInputs = [
curl librsync libthreadar
gpgme libargon2 libgcrypt openssl
bzip2 lz4 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 = {
broken = stdenv.isDarwin;
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;
};
}

View file

@ -0,0 +1,34 @@
{ lib, 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 lib; {
description = "Data deduplication program";
homepage = "https://git.2f30.org/dedup/file/README.html";
license = with licenses; [ bsd0 isc ];
maintainers = with maintainers; [ dtzWill ];
};
}

View file

@ -0,0 +1,64 @@
{ fetchurl, lib, stdenv, makeWrapper, perl, perlPackages }:
stdenv.mkDerivation rec {
pname = "dirvish";
version = "1.2.1";
src = fetchurl {
url = "http://dirvish.org/dirvish${version}.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 lib; {
description = "Fast, disk based, rotating network backup system";
homepage = "http://dirvish.org/";
license = lib.licenses.osl2;
platforms = platforms.linux;
maintainers = [ maintainers.winpat ];
};
}

View file

@ -0,0 +1,43 @@
{ lib
, buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, testers
, discordchatexporter-cli
}:
buildDotnetModule rec {
pname = "discordchatexporter-cli";
version = "2.34.1";
src = fetchFromGitHub {
owner = "tyrrrz";
repo = "discordchatexporter";
rev = version;
sha256 = "U+AwxHvyLD2BwrJH3h0yKKHBsgBM/D657TuG9IgllPs=";
};
projectFile = "DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj";
nugetDeps = ./deps.nix;
postFixup = ''
ln -s $out/bin/DiscordChatExporter.Cli $out/bin/discordchatexporter-cli
'';
passthru = {
updateScript = ./updater.sh;
tests.version = testers.testVersion {
package = discordchatexporter-cli;
version = "v${version}";
};
};
meta = with lib; {
description = "A tool to export Discord chat logs to a file";
homepage = "https://github.com/Tyrrrz/DiscordChatExporter";
license = licenses.gpl3Plus;
changelog = "https://github.com/Tyrrrz/DiscordChatExporter/blob/${version}/Changelog.md";
maintainers = [ maintainers.ivar ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,10 @@
{ fetchNuGet }: [
(fetchNuGet { pname = "CliFx"; version = "2.2.5"; sha256 = "1bk716rdswy28h53qy68xywci8k1h2iqdy2iz1yf7v8g0sa2n79p"; })
(fetchNuGet { pname = "Gress"; version = "2.0.1"; sha256 = "00xhyfkrlc38nbl6aymr7zwxc3kj0rxvx5gwk6fkfrvi1pzgq0wc"; })
(fetchNuGet { pname = "JsonExtensions"; version = "1.2.0"; sha256 = "0g54hibabbqqfhxjlnxwv1rxagpali5agvnpymp2w3dk8h6q66xy"; })
(fetchNuGet { pname = "MiniRazor.CodeGen"; version = "2.2.1"; sha256 = "1mrjw3vq59pbiqvayilazjgv6l87j20j8hmhcpbacz9p5bl1hvvr"; })
(fetchNuGet { pname = "MiniRazor.Runtime"; version = "2.2.1"; sha256 = "18qx0rzp4xz4ng9yc0c2bcpa4ky6sfiz10828y4j9ymywas7yzxw"; })
(fetchNuGet { pname = "Polly"; version = "7.2.3"; sha256 = "1iws4jd5iqj5nlfp16fg9p5vfqqas1si0cgh8xcj64y433a933cv"; })
(fetchNuGet { pname = "Spectre.Console"; version = "0.44.0"; sha256 = "0f4q52rmib0q3vg7ij6z73mnymyas7c7wrm8dfdhrkdzn53zwl6p"; })
(fetchNuGet { pname = "Superpower"; version = "3.0.0"; sha256 = "0p6riay4732j1fahc081dzgs9q4z3n2fpxrin4zfpj6q2226dhz4"; })
]

View file

@ -0,0 +1,30 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts nuget-to-nix dotnet-sdk_6
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
deps_file="$(realpath "./deps.nix")"
new_version="$(curl -s "https://api.github.com/repos/tyrrrz/DiscordChatExporter/releases?per_page=1" | jq -r '.[0].name')"
old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
if [[ "$new_version" == "$old_version" ]]; then
echo "Up to date"
exit 0
fi
cd ../../../..
update-source-version discordchatexporter-cli "$new_version"
store_src="$(nix-build . -A discordchatexporter-cli.src --no-out-link)"
src="$(mktemp -d /tmp/discordexporter-src.XXX)"
cp -rT "$store_src" "$src"
chmod -R +w "$src"
pushd "$src"
mkdir ./nuget_tmp.packages
dotnet restore DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj --packages ./nuget_tmp.packages
nuget-to-nix ./nuget_tmp.packages > "$deps_file"
popd
rm -r "$src"

View file

@ -0,0 +1,30 @@
{ buildGoModule, fetchFromGitHub, lib, openssh, makeWrapper }:
buildGoModule rec {
pname = "diskrsync";
version = "1.3.0";
src = fetchFromGitHub {
owner = "dop251";
repo = pname;
rev = "v${version}";
sha256 = "sha256-hM70WD+M3jwze0IG84WTFf1caOUk2s9DQ7pR+KNIt1M=";
};
vendorSha256 = "sha256-lJaM/sC5/qmmo7Zu7nGR6ZdXa1qw4SuVxawQ+d/m+Aw=";
ldflags = [ "-s" "-w" ];
nativeBuildInputs = [ makeWrapper ];
preFixup = ''
wrapProgram "$out/bin/diskrsync" --argv0 diskrsync --prefix PATH : ${openssh}/bin
'';
meta = with lib; {
description = "Rsync for block devices and disk images";
homepage = "https://github.com/dop251/diskrsync";
license = licenses.mit;
maintainers = with maintainers; [ jluttine ];
};
}

View file

@ -0,0 +1,24 @@
# Tested with simple dump and restore -i, but complains that
# /nix/store/.../etc/dumpdates doesn't exist.
{ lib, stdenv, fetchurl, pkg-config,
e2fsprogs, ncurses, readline }:
stdenv.mkDerivation rec {
pname = "dump";
version = "0.4b47";
src = fetchurl {
url = "mirror://sourceforge/dump/dump-${version}.tar.gz";
sha256 = "sha256-0CGs3k+77T2T662YFCL2cfSNZrKeyI196DZC7Pv/T9A=";
};
buildInputs = [ e2fsprogs pkg-config ncurses readline ];
meta = with lib; {
homepage = "https://dump.sourceforge.io/";
description = "Linux Ext2 filesystem dump/restore utilities";
license = licenses.bsd3;
maintainers = with maintainers; [ falsifian ];
};
}

View file

@ -0,0 +1,32 @@
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "duplicacy";
version = "2.7.2";
goPackagePath = "github.com/gilbertchen/duplicacy";
src = fetchFromGitHub {
owner = "gilbertchen";
repo = "duplicacy";
rev = "v${version}";
sha256 = "0j37sqicj7rl982czqsl3ipxw7k8k4smcr63s0yklxwz7ch3353c";
};
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 ];
};
}

408
pkgs/tools/backup/duplicacy/deps.nix generated Normal file
View file

@ -0,0 +1,408 @@
# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
[
{
goPackagePath = "cloud.google.com/go";
fetch = {
type = "git";
url = "https://github.com/googleapis/google-cloud-go";
rev = "2d3a6656c17a60b0815b7e06ab0be04eacb6e613";
sha256 = "0fi3qj9fvc4bxbrwa1m5sxsb8yhvawiwigaddvmmizjykxbq5csq";
};
}
{
goPackagePath = "github.com/Azure/go-autorest";
fetch = {
type = "git";
url = "https://github.com/Azure/go-autorest";
rev = "9bc4033dd347c7f416fca46b2f42a043dc1fbdf6";
sha256 = "158xbd8wn1bna1k1ichlirz6a1zvlh3rg7klr9cnp72l2q8jwvcl";
};
}
{
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 = "851d5ffb66720c2540cc68020d4d8708950686c8";
sha256 = "16qp8ywcf04d2y1ibf3mpglcrxk07x8gak46a2l53lchps2mgcrp";
};
}
{
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 = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e";
sha256 = "08m27vlms74pfy5z79w67f9lk9zkx6a9jd68k3c4msxy75ry36mp";
};
}
{
goPackagePath = "github.com/gilbertchen/azure-sdk-for-go";
fetch = {
type = "git";
url = "https://github.com/gilbertchen/azure-sdk-for-go";
rev = "8fd4663cab7c7c1c46d00449291c92ad23b0d0d9";
sha256 = "123fj5jni1pjj8i9adzd4r07n9hnlmfprlcjf5hqb1zjb72xi1p7";
};
}
{
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 = "2233fa1dd846b3a3e8060b6c1ea12883deb9d288";
sha256 = "01fqxad5mm7rs0mp1ipp9aw80ski6sqyqljpf9dgify8dbiffl97";
};
}
{
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/golang/groupcache";
fetch = {
type = "git";
url = "https://github.com/golang/groupcache";
rev = "8c9f03a8e57eb486e42badaed3fb287da51807ba";
sha256 = "0vjjr79r32icjzlb05wn02k59av7jx0rn1jijml8r4whlg7dnkfh";
};
}
{
goPackagePath = "github.com/golang/protobuf";
fetch = {
type = "git";
url = "https://github.com/golang/protobuf";
rev = "84668698ea25b64748563aa20726db66a6b8d299";
sha256 = "1gkd1942vk9n8kfzdwy1iil6wgvlwjq7a3y5jc49ck4lz9rhmgkq";
};
}
{
goPackagePath = "github.com/googleapis/gax-go";
fetch = {
type = "git";
url = "https://github.com/googleapis/gax-go";
rev = "c8a15bac9b9fe955bd9f900272f9a306465d28cf";
sha256 = "13x3x7agq0b46wpchbd2sqli5l33z6hvfn1qjbiqvsgpbv7wd140";
};
}
{
goPackagePath = "github.com/jmespath/go-jmespath";
fetch = {
type = "git";
url = "https://github.com/jmespath/go-jmespath";
rev = "c2b33e84";
sha256 = "1r6w7ydx8ydryxk3sfhzsk8m6f1nsik9jg3i1zhi69v4kfl4d5cz";
};
}
{
goPackagePath = "github.com/klauspost/cpuid";
fetch = {
type = "git";
url = "https://github.com/klauspost/cpuid";
rev = "750c0591dbbd50ef88371c665ad49e426a4b830b";
sha256 = "1yiby4xa12j3kcw5q7dfsbcybhaxjkppvgz6ac2p2lcwha303b1g";
};
}
{
goPackagePath = "github.com/klauspost/reedsolomon";
fetch = {
type = "git";
url = "https://github.com/klauspost/reedsolomon";
rev = "7daa20bf74337a939c54f892a2eca9d9b578eb7f";
sha256 = "1xk4wqgrl63l95lqnszzbpa06apzxfmpwfnkrn1n8jb0ws7mi01m";
};
}
{
goPackagePath = "github.com/kr/fs";
fetch = {
type = "git";
url = "https://github.com/kr/fs";
rev = "1455def202f6e05b95cc7bfc7e8ae67ae5141eba";
sha256 = "11zg176x9hr9q7fsk95r6q0wf214gg4czy02slax4x56n79g6a7q";
};
}
{
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/minio/highwayhash";
fetch = {
type = "git";
url = "https://github.com/minio/highwayhash";
rev = "86a2a969d04373bf05ca722517d30fb1c9a3e4f9";
sha256 = "0kj2hs82sphag0h25xvprvf2fz3zlinmlif89sk9jp8h518aiahf";
};
}
{
goPackagePath = "github.com/mmcloughlin/avo";
fetch = {
type = "git";
url = "https://github.com/mmcloughlin/avo";
rev = "443f81d771042b019379ae4bfcd0a591cb47c88a";
sha256 = "1zc95crbyi7ylqq3jwv4ya55lyzn9x730szdm307vdss4gqlx8yn";
};
}
{
goPackagePath = "github.com/ncw/swift";
fetch = {
type = "git";
url = "https://github.com/ncw/swift";
rev = "3e1a09f21340e4828e7265aa89f4dc1495fa7ccc";
sha256 = "19gb8xh400hzlbdp3nx1f85jxzs36zk0py39vmjcg3fnvdjzblm2";
};
}
{
goPackagePath = "github.com/pkg/errors";
fetch = {
type = "git";
url = "https://github.com/pkg/errors";
rev = "614d223910a179a466c1767a985424175c39b465";
sha256 = "1761pybhc2kqr6v5fm8faj08x9bql8427yqg6vnfv6nhrasx1mwq";
};
}
{
goPackagePath = "github.com/pkg/sftp";
fetch = {
type = "git";
url = "https://github.com/pkg/sftp";
rev = "5616182052227b951e76d9c9b79a616c608bd91b";
sha256 = "1rjlhlkr505a0wvync1ycfn9njfc6bib6bw44qnnm50hlfs59hz2";
};
}
{
goPackagePath = "github.com/pkg/xattr";
fetch = {
type = "git";
url = "https://github.com/pkg/xattr";
rev = "dd870b5cfebab49617ea0c1da6176474e8a52bf4";
sha256 = "11ynkc61qrmf853g04sav8vawz8i6a8b73w71f3cq4djb4cnsw0d";
};
}
{
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 = "go.opencensus.io";
fetch = {
type = "git";
url = "https://github.com/census-instrumentation/opencensus-go";
rev = "d835ff86be02193d324330acdb7d65546b05f814";
sha256 = "0xj16iq5jp26hi2py7lsd8cvqh651fgn39y05gzvjdi88d9xd3nw";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "056763e48d71961566155f089ac0f02f1dda9b5a";
sha256 = "0dcmns62hwid7hk4bmpl22z6ygjh168p23x3arzy320sd1lvap92";
};
}
{
goPackagePath = "golang.org/x/mod";
fetch = {
type = "git";
url = "https://go.googlesource.com/mod";
rev = "859b3ef565e237f9f1a0fb6b55385c497545680d";
sha256 = "0ldgbx2zpprbsfn6p8pfgs4nn87gwbfcv2z0fa7n8alwsq2yw78q";
};
}
{
goPackagePath = "golang.org/x/net";
fetch = {
type = "git";
url = "https://go.googlesource.com/net";
rev = "d3edc9973b7eb1fb302b0ff2c62357091cea9a30";
sha256 = "12zbjwcsh9b0lwycqlkrnbyg5a6a9dzgj8hhgq399bdda5bd97y7";
};
}
{
goPackagePath = "golang.org/x/oauth2";
fetch = {
type = "git";
url = "https://go.googlesource.com/oauth2";
rev = "bf48bf16ab8d622ce64ec6ce98d2c98f916b6303";
sha256 = "1sirdib60zwmh93kf9qrx51r8544k1p9rs5mk0797wibz3m4mrdg";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "59c9f1ba88faf592b225274f69c5ef1e4ebacf82";
sha256 = "014iiqjh9sikbcvacqiwhg6mvrsrr1va91wmc9yrnsm11c63yxfa";
};
}
{
goPackagePath = "golang.org/x/text";
fetch = {
type = "git";
url = "https://go.googlesource.com/text";
rev = "342b2e1fbaa52c93f31447ad2c6abc048c63e475";
sha256 = "0flv9idw0jm5nm8lx25xqanbkqgfiym6619w575p7nrdh0riqwqh";
};
}
{
goPackagePath = "golang.org/x/tools";
fetch = {
type = "git";
url = "https://go.googlesource.com/tools";
rev = "5d1fdd8fa3469142b9369713b23d8413d6d83189";
sha256 = "0xp5ggnjnl1gqwi2ks042zimgkfv2qda9a57ar198xpyzdn1bv5s";
};
}
{
goPackagePath = "golang.org/x/xerrors";
fetch = {
type = "git";
url = "https://go.googlesource.com/xerrors";
rev = "5ec99f83aff198f5fbd629d6c8d8eb38a04218ca";
sha256 = "1dbzc3gmf2haazpv7cgmv97rq40g2xzwbglc17vas8dwhgwgwrzb";
};
}
{
goPackagePath = "google.golang.org/api";
fetch = {
type = "git";
url = "https://github.com/googleapis/google-api-go-client";
rev = "52f0532eadbcc6f6b82d6f5edf66e610d10bfde6";
sha256 = "0l7q0mmq0v51wc72bk50nwaz9frl1pqp7gn5jhy1vzxdry930gkc";
};
}
{
goPackagePath = "google.golang.org/appengine";
fetch = {
type = "git";
url = "https://github.com/golang/appengine";
rev = "971852bfffca25b069c31162ae8f247a3dba083b";
sha256 = "05hbq4cs7bqw0zl17bx8rzdkszid3nyl92100scg3jjrg70dhm7w";
};
}
{
goPackagePath = "google.golang.org/genproto";
fetch = {
type = "git";
url = "https://github.com/googleapis/go-genproto";
rev = "baae70f3302d3efdff74db41e48a5d476d036906";
sha256 = "1xacik4i5w2bpkrxzrfm00ggy5vygbzh8jmm2yq4mxiv0lnsh9nk";
};
}
{
goPackagePath = "google.golang.org/grpc";
fetch = {
type = "git";
url = "https://github.com/grpc/grpc-go";
rev = "ac54eec90516cee50fc6b9b113b34628a85f976f";
sha256 = "17zfx4xgqjamk7rc1sivm5gppkh3j4qp3i294w9rqbv0rqi0c9pq";
};
}
]

View file

@ -0,0 +1,37 @@
{ lib, stdenv, fetchzip, mono, sqlite, makeWrapper }:
stdenv.mkDerivation rec {
pname = "duplicati";
version = "2.0.6.3";
channel = "beta";
build_date = "2021-06-17";
src = fetchzip {
url = "https://github.com/duplicati/duplicati/releases/download/v${version}-${version}_${channel}_${build_date}/duplicati-${version}_${channel}_${build_date}.zip";
sha256 = "sha256-usMwlmer6rLgP46wGVkaAIocUW4MjuEpVWdX7rRcghg=";
stripRoot = false;
};
nativeBuildInputs = [ 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 : ${lib.makeLibraryPath [
sqlite ]}
makeWrapper "${mono}/bin/mono" $out/bin/duplicati-server \
--add-flags "$out/share/${pname}-${version}/Duplicati.Server.exe" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
sqlite ]}
'';
meta = with 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;
};
}

View file

@ -0,0 +1,143 @@
{ lib, stdenv
, fetchFromGitLab
, fetchpatch
, python3
, librsync
, ncftp
, gnupg
, gnutar
, par2cmdline
, util-linux
, rsync
, makeWrapper
, gettext
}:
let
pythonPackages = python3.pkgs;
inherit (lib.versions) majorMinor splitVersion;
majorMinorPatch = v: builtins.concatStringsSep "." (lib.take 3 (splitVersion v));
in
pythonPackages.buildPythonApplication rec {
pname = "duplicity";
version = "0.8.20";
src = fetchFromGitLab {
owner = "duplicity";
repo = "duplicity";
rev = "rel.${version}";
sha256 = "13ghra0myq6h6yx8qli55bh8dg91nf1hpd8l7d7xamgrw6b188sm";
};
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
# https://gitlab.com/duplicity/duplicity/-/merge_requests/64
# remove on next release
(fetchpatch {
url = "https://gitlab.com/duplicity/duplicity/-/commit/5c229a9b42f67257c747fbc0022c698fec405bbc.patch";
sha256 = "05v931rnawfv11cyxj8gykmal8rj5vq2ksdysyr2mb4sl81mi7v0";
})
] ++ lib.optionals stdenv.isLinux [
# Broken on Linux in Nix' build environment
./linux-disable-timezone-test.patch
];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
preConfigure = ''
# fix version displayed by duplicity --version
# see SourceCopy in setup.py
ls
for i in bin/*.1 duplicity/__init__.py; do
substituteInPlace "$i" --replace '$version' "${version}"
done
'';
nativeBuildInputs = [
makeWrapper
gettext
pythonPackages.wrapPython
pythonPackages.setuptools-scm
];
buildInputs = [
librsync
];
pythonPath = with pythonPackages; [
b2sdk
boto
boto3
cffi
cryptography
ecdsa
idna
pygobject3
fasteners
lockfile
paramiko
pyasn1
pycrypto
pydrive2
future
];
checkInputs = [
gnupg # Add 'gpg' to PATH.
gnutar # Add 'tar' to PATH.
librsync # Add 'rdiff' to PATH.
par2cmdline # Add 'par2' to PATH.
] ++ lib.optionals stdenv.isLinux [
util-linux # Add 'setsid' to PATH.
] ++ (with pythonPackages; [
lockfile
mock
pexpect
pytest
pytest-runner
]);
postInstall = ''
wrapProgram $out/bin/duplicity \
--prefix PATH : "${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
# check version string
duplicity --version | grep ${version}
'' + 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 lib; {
description = "Encrypted bandwidth-efficient backup using the rsync algorithm";
homepage = "https://duplicity.gitlab.io/duplicity-web/";
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,20 @@
diff --git a/testing/functional/test_restart.py b/testing/functional/test_restart.py
index 6d972c82..e8435fd5 100644
--- a/testing/functional/test_restart.py
+++ b/testing/functional/test_restart.py
@@ -350,14 +350,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(u"full", u"{0}/testfiles/blocktartest".format(_runtest_dir))

View file

@ -0,0 +1,16 @@
commit f0142706c377b7c133753db57b5c4c90baa2de30
Author: Guillaume Girol <symphorien+git@xlumurb.eu>
Date: Sun Jul 11 17:48:15 2021 +0200
diff --git a/testing/unit/test_statistics.py b/testing/unit/test_statistics.py
index 4be5000c..80545853 100644
--- a/testing/unit/test_statistics.py
+++ b/testing/unit/test_statistics.py
@@ -63,6 +63,7 @@ class StatsObjTest(UnitTestCase):
s1 = StatsDeltaProcess()
assert s1.get_stat(u'SourceFiles') == 0
+ @unittest.skip("Broken on Linux in Nix' build environment")
def test_get_stats_string(self):
u"""Test conversion of stat object into string"""
s = StatsObj()

View file

@ -0,0 +1,63 @@
commit ccd4dd92cd37acce1da20966ad9e4e0c7bcf1709
Author: Guillaume Girol <symphorien+git@xlumurb.eu>
Date: Sun Jul 11 12:00:00 2021 +0000
use installed duplicity when running tests
diff --git a/setup.py b/setup.py
index fa474f20..604a242a 100755
--- a/setup.py
+++ b/setup.py
@@ -205,10 +205,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)
diff --git a/testing/functional/__init__.py b/testing/functional/__init__.py
index 4221576d..3cf44945 100644
--- a/testing/functional/__init__.py
+++ b/testing/functional/__init__.py
@@ -111,7 +111,7 @@ class FunctionalTestCase(DuplicityTestCase):
run_coverage = os.environ.get(u'RUN_COVERAGE', None)
if run_coverage is not None:
cmd_list.extend([u"-m", u"coverage", u"run", u"--source=duplicity", u"-p"])
- cmd_list.extend([u"{0}/bin/duplicity".format(_top_dir)])
+ cmd_list.extend([u"duplicity"])
cmd_list.extend(options)
cmd_list.extend([u"-v0"])
cmd_list.extend([u"--no-print-statistics"])
diff --git a/testing/functional/test_log.py b/testing/functional/test_log.py
index 9dfc86a6..b9cb55db 100644
--- a/testing/functional/test_log.py
+++ b/testing/functional/test_log.py
@@ -49,9 +49,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"{0} {1}/bin/duplicity --log-file={2} >/dev/null 2>&1".format(basepython, _top_dir, self.logfile))
+ os.system(u"{0} duplicity --log-file={1} >/dev/null 2>&1".format(basepython, self.logfile))
else:
- os.system(u"{0}/bin/duplicity --log-file={1} >/dev/null 2>&1".format(_top_dir, self.logfile))
+ os.system(u"duplicity --log-file={0} >/dev/null 2>&1".format(self.logfile))
# The format of the file should be:
# """ERROR 2
diff --git a/testing/functional/test_rdiffdir.py b/testing/functional/test_rdiffdir.py
index 0cbfdb33..47acd029 100644
--- a/testing/functional/test_rdiffdir.py
+++ b/testing/functional/test_rdiffdir.py
@@ -44,7 +44,7 @@ class RdiffdirTest(FunctionalTestCase):
basepython = os.environ.get(u'TOXPYTHON', None)
if basepython is not None:
cmd_list.extend([basepython])
- cmd_list.extend([u"{0}/bin/rdiffdir".format(_top_dir)])
+ cmd_list.extend([u"rdiffdir"])
cmd_list.extend(argstring.split())
cmdline = u" ".join([u'"%s"' % x for x in cmd_list])
self.run_cmd(cmdline)

View file

@ -0,0 +1,41 @@
{ lib, stdenv, fetchurl, coreutils, python3, duplicity, gawk, gnupg, bash
, gnugrep, txt2man, makeWrapper, which
}:
stdenv.mkDerivation rec {
pname = "duply";
version = "2.4";
src = fetchurl {
url = "mirror://sourceforge/project/ftplicity/duply%20%28simple%20duplicity%29/2.4.x/duply_${version}.tgz";
hash = "sha256-DCrp3o/ukzkfnVaLbIK84bmYnXvqKsvlkGn3GJY3iNg=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ txt2man ];
postPatch = "patchShebangs .";
installPhase = ''
mkdir -p "$out/bin"
mkdir -p "$out/share/man/man1"
install -vD duply "$out/bin"
wrapProgram "$out/bin/duply" --set PATH \
${lib.makeBinPath [ coreutils python3 duplicity gawk gnupg bash gnugrep txt2man which ]}
"$out/bin/duply" txt2man > "$out/share/man/man1/duply.1"
'';
meta = with 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 = lib.platforms.unix;
};
}

View file

@ -0,0 +1,31 @@
{lib, 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 lib; {
homepage = "https://github.com/sjau/easysnap";
description = "Customizable ZFS Snapshotting tool with zfs send/recv pulling";
license = licenses.gpl3;
maintainers = with maintainers; [ sjau ];
};
}

View file

@ -0,0 +1,51 @@
{ lib, 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 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 ];
};
}

View file

@ -0,0 +1,31 @@
{ lib, makeWrapper, buildGoModule, fetchFromGitHub, lepton }:
buildGoModule {
pname = "gb-backup";
version = "unstable-2021-10-27";
src = fetchFromGitHub {
owner = "leijurv";
repo = "gb";
rev = "61383d445af7b035fb8e1df0cacc424340dd16df";
sha256 = "sha256-YRrD2gW+gzxD2JwadCbF/SBSsHeeGPsa8kKZHHAytVo=";
};
vendorSha256 = "sha256-H3Zf4VNJVX9C3GTeqU4YhNqCIQz1R55MfhrygDgJTxc=";
nativeBuildInputs = [ makeWrapper ];
checkInputs = [ lepton ];
postFixup = ''
wrapProgram $out/bin/gb --prefix PATH : ${lib.makeBinPath [ lepton ]}
'';
meta = with lib; {
description = "Gamer Backup, a super opinionated cloud backup system";
homepage = "https://github.com/leijurv/gb";
license = licenses.agpl3Only;
maintainers = with maintainers; [ babbaj ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,27 @@
{ lib
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "gh2md";
version = "2.0.0";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "7a277939d4781f4ca741eccb74fc70f0aa85811185da52219878129cba7f1d77";
};
propagatedBuildInputs = with python3Packages; [ six requests python-dateutil ];
# uses network
doCheck = false;
pythonImportsCheck = [ "gh2md" ];
meta = with lib; {
description = "Export Github repository issues to markdown files";
homepage = "https://github.com/mattduck/gh2md";
license = licenses.mit;
maintainers = with maintainers; [ artturin ];
};
}

View file

@ -0,0 +1,54 @@
{ lib
, fetchFromGitHub
, python3Packages
, ffmpeg
}:
python3Packages.buildPythonApplication rec {
pname = "gphotos-sync";
version = "2.14.2";
src = fetchFromGitHub {
owner = "gilesknap";
repo = "gphotos-sync";
rev = version;
sha256 = "0cfmbrdy6w18hb623rjn0a4hnn3n63jw2jlmgn4a2k1sjqhpx3bf";
};
propagatedBuildInputs = with python3Packages; [
appdirs
attrs
exif
psutil
pyyaml
requests-oauthlib
];
buildInputs = [
ffmpeg
];
checkInputs = with python3Packages; [
pytestCheckHook
mock
];
checkPhase = ''
export HOME=$(mktemp -d)
# patch to skip all tests that do network access
cat >>test/test_setup.py <<EOF
import pytest, requests
requests.Session.__init__ = lambda *args, **kwargs: pytest.skip("no network access")
EOF
pytestCheckPhase
'';
meta = with lib; {
description = "Google Photos and Albums backup with Google Photos Library API";
homepage = "https://github.com/gilesknap/gphotos-sync";
license = licenses.mit;
maintainers = with maintainers; [ dnr ];
};
}

View file

@ -0,0 +1,58 @@
{ lib, python38, fetchFromGitHub }:
let
python = python38.override {
self = python;
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.3.24";
src = oldAttrs.src.override {
inherit version;
hash = "sha256-67t3fL+TEjWbiXv4G6ANrg9ctp+6KhgmXcwYpvXvdRk=";
};
doCheck = false;
});
tornado = super.tornado_4;
};
};
in
with python.pkgs; buildPythonApplication rec {
pname = "grab-site";
version = "2.2.2";
src = fetchFromGitHub {
rev = version;
owner = "ArchiveTeam";
repo = "grab-site";
sha256 = "0af53g703kqpxa6bn72mb2l5l0qrjknq5wqwl4wryyscdp4xabx4";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"wpull @ https://github.com/ArchiveTeam/ludios_wpull/tarball/master#egg=wpull-${ludios_wpull.version}"' '"wpull"'
'';
propagatedBuildInputs = [
click
ludios_wpull
manhole
lmdb
autobahn
fb-re2
websockets
cchardet
];
checkPhase = ''
export PATH=$PATH:$out/bin
bash ./tests/offline-tests
'';
meta = with 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;
};
}

View file

@ -0,0 +1,35 @@
{ lib, stdenv, fetchFromGitHub, fuse, icu66, pkg-config, 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";
# include sys/sysctl.h is deprecated in glibc. The sysctl calls are only used
# for Apple to determine the kernel version. Because this build only targets
# Linux is it safe to remove.
patches = [ ./remove-sysctl.patch ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
fuse icu66 libxml2 libuuid
];
meta = with 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";
};
}

View file

@ -0,0 +1,14 @@
diff --git a/src/libltfs/arch/arch_info.c b/src/libltfs/arch/arch_info.c
index 179428f..114acf0 100644
--- a/src/libltfs/arch/arch_info.c
+++ b/src/libltfs/arch/arch_info.c
@@ -47,9 +47,6 @@
*/
#include "libltfs/ltfs.h"
-#ifndef mingw_PLATFORM
-#include <sys/sysctl.h>
-#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

View file

@ -0,0 +1,22 @@
{ lib, 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 ] ++ lib.optional stdenv.isDarwin libiconv;
enableParallelBuilding = true;
meta = with lib; {
description = "Easy-to-use offline browser / website mirroring utility";
homepage = "http://www.httrack.com";
license = licenses.gpl3;
platforms = with platforms; unix;
};
}

View file

@ -0,0 +1,39 @@
{ stdenv, mkDerivation, lib, fetchurl, cmake, pkg-config, 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 pkg-config ];
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 lib; {
broken = stdenv.isDarwin;
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;
};
}

View file

@ -0,0 +1,35 @@
{ 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 ];
};
}

View file

@ -0,0 +1,31 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kopia";
version = "0.10.7";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-f1wJuQGwDQAGPYRacvrMs4uSiUdaMCXkRnZYhkA3/JI=";
};
vendorSha256 = "sha256-iBBESP7yR+tFYgQ1saIhpw8R2kiVVvUeA0mhgTxyhAE=";
doCheck = false;
subPackages = [ "." ];
ldflags = [
"-X github.com/kopia/kopia/repo.BuildVersion=${version}"
"-X github.com/kopia/kopia/repo.BuildInfo=${src.rev}"
];
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 ];
};
}

View file

@ -0,0 +1,45 @@
{ mkDerivation, lib, fetchurl
, pkg-config, libtool, qmake
, rsync, ssh
}:
with 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 = [ pkg-config 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;
};
}

View file

@ -0,0 +1,2 @@
source 'https://rubygems.org/'
gem 'lvmsync'

View file

@ -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

View file

@ -0,0 +1,34 @@
{ lib, stdenv, bundlerEnv, ruby, bundlerUpdateScript, makeWrapper }:
stdenv.mkDerivation rec {
pname = "lvmsync";
version = (import ./gemset.nix).${pname}.version;
buildInputs = [ makeWrapper ];
dontUnpack = true;
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 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 ];
};
}

View file

@ -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";
};
}

View file

@ -0,0 +1,32 @@
{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "mastodon-archive";
version = "1.3.1";
src = fetchFromGitHub {
owner = "kensanata";
repo = "mastodon-backup";
rev = "v${version}";
sha256 = "1dlrkygywxwm6xbn0pnfwd3f7641wnvxdyb5qihbsf62w1w08x8r";
};
propagatedBuildInputs = with python3.pkgs; [
html2text
mastodon-py
progress
];
# There is no test
doCheck = false;
meta = with lib; {
description = "Utility for backing up your Mastodon content";
homepage = "https://alexschroeder.ch/software/Mastodon_Archive";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ julm ];
};
}

View file

@ -0,0 +1,35 @@
{ lib, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, libiconv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "monolith";
version = "2.6.1";
src = fetchFromGitHub {
owner = "Y2Z";
repo = pname;
rev = "v${version}";
sha256 = "sha256-JhQkoVGJpMesNz2hRe+kWNX4zYrIcKzT0Z6owrXlRN4=";
};
cargoSha256 = "sha256-BikzJr50Aua9llyQgbP/paIoC7dvsG0RYyVXmbdeGIA=";
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
++ lib.optionals stdenv.isDarwin [ libiconv Security ];
checkFlagsArray = [ "--skip=tests::cli" ];
meta = with lib; {
description = "Bundle any web page into a single HTML file";
homepage = "https://github.com/Y2Z/monolith";
license = licenses.unlicense;
maintainers = with maintainers; [ Br1ght0ne ];
};
}

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "mt-st";
version = "1.3";
src = fetchurl {
url = "https://github.com/iustin/mt-st/releases/download/mt-st-${version}/mt-st-${version}.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 = lib.licenses.gpl2;
maintainers = [ lib.maintainers.redvers ];
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,28 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "mtx";
version = "1.3.12";
src = fetchurl {
url = "mirror://gentoo/distfiles/mtx-${version}.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 = lib.licenses.gpl2;
maintainers = [ lib.maintainers.redvers ];
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
, glib, zlib, pcre, libmysqlclient, libressl }:
let inherit (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 pkg-config ];
buildInputs = [ glib zlib pcre libmysqlclient libressl ];
cmakeFlags = [ "-DMYSQL_INCLUDE_DIR=${getDev libmysqlclient}/include/mysql" ];
meta = with lib; {
description = "High-perfomance MySQL backup tool";
homepage = "https://github.com/maxbube/mydumper";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ izorkin ];
};
}

View file

@ -0,0 +1,50 @@
{ lib
, stdenv
, fetchurl
, perlPackages
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "mylvmbackup";
version = "0.16";
src = fetchurl {
url = "https://www.lenzg.net/mylvmbackup/${pname}-${version}.tar.gz";
sha256 = "sha256-vb7M3EPIrxIz6jUwm241fzaEz2czqdCObrFgSOSgJRU=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perlPackages.perl ];
dontConfigure = true;
postPatch = ''
patchShebangs mylvmbackup
substituteInPlace Makefile \
--replace "prefix = /usr/local" "prefix = ${builtins.placeholder "out"}" \
--replace "sysconfdir = /etc" "sysconfdir = ${builtins.placeholder "out"}/etc" \
--replace "/usr/bin/install" "install"
'';
postInstall = ''
wrapProgram "$out/bin/mylvmbackup" \
--prefix PERL5LIB : "${perlPackages.makePerlPath (
with perlPackages; [
ConfigIniFiles
DBDmysql
DBI
TimeDate
FileCopyRecursive
]
)}"
'';
meta = {
homepage = "https://www.lenzg.net/mylvmbackup/";
description = "a tool for quickly creating full physical backups of a MySQL server's data files";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ ryantm ];
platforms = with lib.platforms; linux;
};
}

View file

@ -0,0 +1,50 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook
, pkg-config, libuuid, e2fsprogs, nilfs-utils, ntfs3g, openssl
}:
stdenv.mkDerivation rec {
pname = "partclone";
version = "0.3.18";
src = fetchFromGitHub {
owner = "Thomas-Tsai";
repo = "partclone";
rev = version;
sha256 = "sha256-cSxQJmuKm54AzIQbsEZhv/I8hfpaGroszdWqbRb3Ht4=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [
e2fsprogs libuuid stdenv.cc.libc nilfs-utils ntfs3g openssl
(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 = with lib; {
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 = licenses.gpl2Plus;
maintainers = with maintainers; [ marcweber ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,49 @@
{lib, stdenv
, fetchurl
, fetchpatch
, bzip2
, zlib
, newt
, openssl
, pkg-config
, slang
, autoreconfHook
}:
stdenv.mkDerivation rec {
pname = "partimage";
version = "0.6.9";
enableParallelBuilding = true;
src = fetchurl {
url = "mirror://sourceforge/partimage/partimage-${version}.tar.bz2";
sha256 = "0db6xiphk6xnlpbxraiy31c5xzj0ql6k4rfkmqzh665yyj0nqfkm";
};
configureFlags = [ "--with-ssl-headers=${openssl.dev}/include/openssl" ];
nativeBuildInputs = [ pkg-config 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 = lib.licenses.gpl2;
maintainers = [lib.maintainers.marcweber];
platforms = lib.platforms.linux;
};
}

View file

@ -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;

View file

@ -0,0 +1,6 @@
{ callPackage, ... } @ args:
callPackage ./generic.nix (args // {
version = "2.4.20";
sha256 = "0awdpkcgvx2aq7pwxy8jyzkin6cyrrh3d576x9ldm851kis9n5ii";
})

View file

@ -0,0 +1,14 @@
{ callPackage, ... } @ args:
callPackage ./generic.nix (args // {
version = "8.0.13";
sha256 = "0cj0fnjimv22ykfl0yk6w29wcjvqp8y8j2g1c6gcml65qazrswyr";
extraPatches = [
./abi-check.patch
];
extraPostInstall = ''
rm -r "$out"/docs
'';
})

View file

@ -0,0 +1,18 @@
MySQL ABI check assumes that with -nostdinc any standard #include terminates
preprocessing, but we do not provide that:
https://github.com/NixOS/nixpkgs/issues/44530
"#error" does not terminate preprocessing, so we #include a non-existent file instead.
--- a/cmake/do_abi_check.cmake
+++ b/cmake/do_abi_check.cmake
@@ -68,1 +68,1 @@ FOREACH(file ${ABI_HEADERS})
- -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
+ -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include/nostdinc -I${SOURCE_DIR}/include
@@ -74,1 +74,1 @@ FOREACH(file ${ABI_HEADERS})
- COMMAND sed -e "/^# /d"
+ COMMAND sed -e "/^# /d" -e "/^#include <-nostdinc>$/d"
--- /dev/null
+++ b/include/nostdinc/stdint.h
@@ -0,0 +1,1 @@
+#include <-nostdinc>

View file

@ -0,0 +1,63 @@
{ lib, stdenv, fetchFromGitHub, bison, boost, cmake, makeWrapper, pkg-config
, curl, cyrus_sasl, libaio, libedit, libev, libevent, libgcrypt, libgpg-error, 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 pkg-config ];
buildInputs = [
curl cyrus_sasl libaio libedit libev libevent libgcrypt libgpg-error lz4
ncurses numactl openssl protobuf valgrind xxd zlib
] ++ (with perlPackages; [ perl DBI DBDmysql ]);
patches = extraPatches;
# Workaround build failure on -fno-common toolchains:
# ld: xbstream.c.o:(.bss+0x0): multiple definition of
# `datasink_buffer'; ds_buffer.c.o:(.data.rel.local+0x0): first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
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 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 ];
};
}

View file

@ -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 ];
};
}

View file

@ -0,0 +1,33 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, libsodium
, llvmPackages, clang, xz
, Security }:
rustPlatform.buildRustPackage rec {
pname = "rdedup";
version = "3.2.1";
src = fetchFromGitHub {
owner = "dpc";
repo = "rdedup";
rev = "v${version}";
sha256 = "sha256-GEYP18CaCQShvCg8T7YTvlybH1LNO34KBxgmsTv2Lzs=";
};
cargoSha256 = "sha256-I6d3IyPBcUsrvlzF7W0hFM4hcXi4wWro9bCeP4eArHI=";
nativeBuildInputs = [ pkg-config llvmPackages.libclang clang ];
buildInputs = [ openssl libsodium xz ]
++ (lib.optional stdenv.isDarwin Security);
configurePhase = ''
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
'';
meta = with 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;
};
}

View file

@ -0,0 +1,36 @@
{ lib, python3Packages, librsync }:
let
pypkgs = python3Packages;
in
pypkgs.buildPythonApplication rec {
pname = "rdiff-backup";
version = "2.0.5";
src = pypkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-VNFgOOYgFO2RbHHIMDsH0vphpqaAOMoYn8LTFTSw84s=";
};
# pkg_resources fails to find the version and then falls back to "DEV"
postPatch = ''
substituteInPlace src/rdiff_backup/Globals.py \
--replace 'version = "DEV"' 'version = "${version}"'
'';
buildInputs = [ librsync ];
nativeBuildInputs = with pypkgs; [ setuptools-scm ];
# no tests from pypi
doCheck = false;
meta = with lib; {
description = "Backup system trying to combine best a mirror and an incremental backup system";
homepage = "https://rdiff-backup.net";
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, glib, pcre }:
stdenv.mkDerivation {
pname = "rdup";
version = "1.1.15";
src = fetchFromGitHub {
owner = "miekg";
repo = "rdup";
rev = "d66e4320cd0bbcc83253baddafe87f9e0e83caa6";
sha256 = "0bzyv6qmnivxnv9nw7lnfn46k0m1dlxcjj53zcva6v8y8084l1iw";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ glib pcre ];
meta = {
description = "The only backup program that doesn't make backups";
homepage = "https://github.com/miekg/rdup";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ sternenseemann ];
};
}

View file

@ -0,0 +1,25 @@
From 8e6186be04e2819b6e3586e5d1aeb8a824e1979f Mon Sep 17 00:00:00 2001
From: Simon Bruder <simon@sbruder.de>
Date: Thu, 25 Feb 2021 09:20:51 +0100
Subject: [PATCH] Skip testing restore with permission failure
The test fails in sandboxed builds.
---
cmd/restic/integration_test.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmd/restic/integration_test.go b/cmd/restic/integration_test.go
index 7d198d33..1588ccb1 100644
--- a/cmd/restic/integration_test.go
+++ b/cmd/restic/integration_test.go
@@ -1170,6 +1170,7 @@ func TestRestoreLatest(t *testing.T) {
}
func TestRestoreWithPermissionFailure(t *testing.T) {
+ t.Skip("Skipping testing restore with permission failure")
env, cleanup := withTestEnvironment(t)
defer cleanup()
--
2.29.2

View file

@ -0,0 +1,51 @@
{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles, makeWrapper
, nixosTests, rclone }:
buildGoModule rec {
pname = "restic";
version = "0.13.1";
src = fetchFromGitHub {
owner = "restic";
repo = "restic";
rev = "v${version}";
sha256 = "sha256-jQgUPZumcIDkZ4s7R8o5F/p/b4ilPJGMPFKvUU30WaY=";
};
patches = [
# The TestRestoreWithPermissionFailure test fails in Nixs build sandbox
./0001-Skip-testing-restore-with-permission-failure.patch
];
vendorSha256 = "sha256-DWfCjGXjZnZa2mXPmXQmvGDtXb0H1wJqCgVsDjdVy9U=";
subPackages = [ "cmd/restic" ];
nativeBuildInputs = [ installShellFiles makeWrapper ];
passthru.tests.restic = nixosTests.restic;
postPatch = ''
rm cmd/restic/integration_fuse_test.go
'';
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";
changelog = "https://github.com/restic/restic/blob/${src.rev}/CHANGELOG.md";
description = "A backup program that is fast, efficient and secure";
platforms = platforms.linux ++ platforms.darwin;
license = licenses.bsd2;
maintainers = [ maintainers.mbrgm maintainers.dotlambda ];
};
}

View file

@ -0,0 +1,32 @@
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
buildGoModule rec {
pname = "restic-rest-server";
version = "0.11.0";
src = fetchFromGitHub {
owner = "restic";
repo = "rest-server";
rev = "v${version}";
hash = "sha256-ninPODztNzvB2js9cuNAuExQLK/OGOu80ZNW0BPrdds=";
};
vendorSha256 = "sha256-8x5qYvIX/C5BaewrTNVbIIadL+7XegbRUZiEDWmJM+c=";
patches = [
(fetchpatch {
name = "backport_rest-server_tests_os.TempDir.patch";
url = "https://github.com/restic/rest-server/commit/a87a50ad114bdaddc895413396438df6ea0affbb.patch";
sha256 = "sha256-O6ENxTK2fCVTZZKTFHrvZ+3dT8TbgbIE0o3sYE/RUqc=";
})
];
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 ];
};
}

View file

@ -0,0 +1,38 @@
{ lib
, python3
, fetchFromGitHub
}:
python3.pkgs.buildPythonApplication rec {
pname = "rotate-backups";
version = "8.1";
src = fetchFromGitHub {
owner = "xolox";
repo = "python-rotate-backups";
rev = version;
sha256 = "0r4dyd7hj403rksgp3vh1azp9n4af75r3wq3x39wxcqizpms3vkx";
};
propagatedBuildInputs = with python3.pkgs; [
python-dateutil
simpleeval
update-dotdee
];
checkInputs = with python3.pkgs; [
pytestCheckHook
];
disabledTests = [
# https://github.com/xolox/python-rotate-backups/issues/33
"test_removal_command"
];
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 ];
};
}

View file

@ -0,0 +1,46 @@
{ lib, stdenv, coreutils, gawk, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "rsbep";
version = "0.2.0";
src = fetchFromGitHub {
owner = "ttsiodras";
repo = "rsbep-backup";
rev = "v${version}";
sha256 = "0is4jgil3wdqbvx9h66xcyzbqy84ndyydnnay2g9k81a4mcz4dns";
};
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 gawk ]}"
sed -i "2i$path" freeze.sh
sed -i "2i$path" melt.sh
# Remove unneded binary
rm poorZFS.py
'';
doInstallCheck = true;
installCheckPhase = ''
cd $TMP
echo hello > input
$out/bin/freeze.sh input > packed
$out/bin/melt.sh packed > output
diff -u input output
'';
meta = with lib; {
description = "Create resilient backups with Reed-Solomon error correction and byte-spreading";
homepage = "https://www.thanassis.space/rsbep.html";
license = licenses.gpl3Plus;
maintainers = [ maintainers.earvstedt ];
};
}

View file

@ -0,0 +1,28 @@
{ fetchurl, lib, stdenv, perl, openssh, rsync, logger }:
stdenv.mkDerivation rec {
pname = "rsnapshot";
version = "1.4.4";
src = fetchurl {
url = "https://rsnapshot.org/downloads/rsnapshot-${version}.tar.gz";
sha256 = "sha256-wct8t0jFqWVsOGNivfbCZ5WXN3JKu1Bfv56UCp2YhXk=";
};
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 lib; {
description = "A filesystem snapshot utility for making backups of local and remote systems";
homepage = "https://rsnapshot.org/";
license = lib.licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,37 @@
{ lib, fetchFromGitHub, python3Packages, sqlite, which }:
python3Packages.buildPythonApplication rec {
pname = "s3ql";
version = "3.8.1";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "release-${version}";
sha256 = "0kk8jjb9zir4wfxv4zsa4ysj77322l73vddcx4y6czjq1j9jz9f2";
};
checkInputs = [ which ] ++ (with python3Packages; [ cython pytest pytest-trio ]);
propagatedBuildInputs = with python3Packages; [
sqlite apsw pycrypto requests defusedxml dugong
google-auth google-auth-oauthlib trio pyfuse3
];
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 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;
};
}

View file

@ -0,0 +1,56 @@
{ lib, stdenv, fetchFromGitHub, nixosTests, makeWrapper, zfs
, perlPackages, procps, which, openssh, mbuffer, pv, lzop, gzip, pigz }:
stdenv.mkDerivation rec {
pname = "sanoid";
version = "2.1.0";
src = fetchFromGitHub {
owner = "jimsalterjrs";
repo = pname;
rev = "v${version}";
sha256 = "12g5cjx34ys6ix6ivahsbr3bbbi1fmjwdfdk382z6q71w3pyxxzf";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = with perlPackages; [ perl ConfigIniFiles CaptureTiny ];
passthru.tests = nixosTests.sanoid;
installPhase = ''
runHook preInstall
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 : "${lib.makeBinPath [ procps "/run/booted-system/sw" zfs ]}"
install -m755 syncoid "$out/bin/syncoid"
wrapProgram "$out/bin/syncoid" \
--prefix PERL5LIB : "$PERL5LIB" \
--prefix PATH : "${lib.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 : "${lib.makeBinPath [ "/run/booted-system/sw" zfs ]}"
runHook postInstall
'';
meta = with lib; {
description = "A policy-driven snapshot management tool for ZFS filesystems";
homepage = "https://github.com/jimsalterjrs/sanoid";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ lopsided98 ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,30 @@
{ lib
, stdenv
, fetchFromGitHub
, gitUpdater
, autoreconfHook
}:
stdenv.mkDerivation rec {
pname = "stenc";
version = "1.0.8";
src = fetchFromGitHub {
owner = "scsitape";
repo = "stenc";
rev = version;
sha256 = "0dsmvr1xpwkcd9yawv4c4vna67yag7jb8jcgn2amywz7nkpzmyxd";
};
nativeBuildInputs = [ autoreconfHook ];
passthru.updateScript = gitUpdater { inherit pname version; };
meta = {
description = "SCSI Tape Encryption Manager";
homepage = "https://github.com/scsitape/stenc";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ woffs ];
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,110 @@
{lib, stdenv, which, coreutils, perl, fetchurl, 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;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl ];
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.withPackages (p: [ p.DBFile ])}/bin/perl@'
for p in $out/bin/*
do wrapProgram "$p" --prefix PATH ":" "${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 = lib.licenses.gpl3Plus;
maintainers = [lib.maintainers.marcweber];
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,44 @@
{ lib, stdenv, fetchurl, openssl, zlib, e2fsprogs, bash, bzip2 }:
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.40";
src = fetchurl {
url = "https://www.tarsnap.com/download/tarsnap-autoconf-${version}.tgz";
sha256 = "1mbzq81l4my5wdhyxyma04sblr43m8p7ryycbpi6n78w1hwfbjmw";
};
preConfigure = ''
configureFlags="--with-bash-completion-dir=$out/share/bash-completion/completions"
'';
patchPhase = ''
substituteInPlace Makefile.in \
--replace "command -p mv" "mv"
substituteInPlace configure \
--replace "command -p getconf PATH" "echo $PATH"
'';
postInstall = ''
# Install some handy-dandy shell completions
install -m 444 -D ${zshCompletion} $out/share/zsh/site-functions/_tarsnap
'';
buildInputs = [ openssl zlib ] ++ lib.optional stdenv.isLinux e2fsprogs
++ lib.optional stdenv.isDarwin bzip2;
meta = {
description = "Online backups for the truly paranoid";
homepage = "http://www.tarsnap.com/";
license = lib.licenses.unfree;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ thoughtpolice roconnor ];
};
}

View file

@ -0,0 +1,49 @@
{ lib
, python3Packages
, fetchFromGitHub
, tarsnap
}:
python3Packages.buildPythonApplication rec {
pname = "tarsnapper";
version = "0.4";
src = fetchFromGitHub {
owner = "miracle2k";
repo = pname;
rev = version;
sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
};
propagatedBuildInputs = with python3Packages; [
pyyaml
python-dateutil
pexpect
];
checkInputs = with python3Packages; [
nose
];
patches = [
# Remove standard module argparse from requirements
./remove-argparse.patch
];
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ tarsnap ]}" ];
checkPhase = ''
runHook preCheck
nosetests tests
runHook postCheck
'';
pythonImportsCheck = [ "tarsnapper" ];
meta = with lib; {
description = "Wrapper which expires backups using a gfs-scheme";
homepage = "https://github.com/miracle2k/tarsnapper";
license = licenses.bsd2;
maintainers = with maintainers; [ ];
};
}

View file

@ -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
)

View file

@ -0,0 +1,205 @@
{ lib
, callPackage
, nixosTests
, stdenv
, fetchurl
, autoPatchelfHook
, rpmextract
, openssl
, zlib
, lvm2 # LVM image backup and restore functions (optional)
, acl # EXT2/EXT3/XFS ACL support (optional)
, gnugrep
, procps
, jdk8 # Java GUI (needed for `enableGui`)
, buildEnv
, makeWrapper
, enableGui ? false # enables Java GUI `dsmj`
# 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.ibm.com/support/pages/node/660813#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/docs/en/spectrum-protect/8.1.13?topic=solaris-set-api-environment-variables
# The newest version of TSM client should be discoverable by
# going to the `downloadPage` (see `meta` below).
# Find the "Backup-archive client" table on that page.
# Look for "Download Documents" of the latest release.
# Here, two links must be checked:
# * "IBM Spectrum Protect Client ... Downloads and READMEs":
# In the table at the page's bottom,
# check the date of the "Linux x86_64 client"
# * "IBM Spectrum Protect BA client ... interim fix downloads"
# Look for the "Linux x86_64 client" rows
# in the table # at the bottom of each page.
# Follow the "HTTPS" link of the row with the latest date stamp.
# In the directory listing to show up, pick the big `.tar` file.
#
# (as of 2021-12-18)
let
meta = {
homepage = "https://www.ibm.com/products/data-protection-and-recovery";
downloadPage = "https://www.ibm.com/support/pages/ibm-spectrum-protect-downloads-latest-fix-packs-and-interim-fixes";
platforms = [ "x86_64-linux" ];
mainProgram = "dsmc";
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.
'';
};
passthru.tests = {
test-cli = callPackage ./test-cli.nix {};
test-gui = nixosTests.tsm-client-gui;
};
mkSrcUrl = version:
let
major = lib.versions.major version;
minor = lib.versions.minor version;
patch = lib.versions.patch version;
fixup = lib.lists.elemAt (lib.versions.splitVersion version) 3;
in
"https://public.dhe.ibm.com/storage/tivoli-storage-management/${if fixup=="0" then "maintenance" else "patches"}/client/v${major}r${minor}/Linux/LinuxX86/BA/v${major}${minor}${patch}/${version}-TIV-TSMBAC-LinuxX86.tar";
unwrapped = stdenv.mkDerivation rec {
name = "tsm-client-${version}-unwrapped";
version = "8.1.14.0";
src = fetchurl {
url = mkSrcUrl version;
sha256 = "1iczc4w8rwzqnw01r89kwxcdr7pnwh3nqr3a0q8ncrxrhsy3qwn0";
};
inherit meta passthru;
nativeBuildInputs = [
autoPatchelfHook
rpmextract
];
buildInputs = [
openssl
stdenv.cc.cc
zlib
];
runtimeDependencies = [
(lib.attrsets.getLib lvm2)
];
sourceRoot = ".";
postUnpack = ''
rpmextract TIVsm-API64.x86_64.rpm
rpmextract TIVsm-APIcit.x86_64.rpm
rpmextract TIVsm-BA.x86_64.rpm
rpmextract TIVsm-BAcit.x86_64.rpm
rpmextract TIVsm-BAhdw.x86_64.rpm
rpmextract TIVsm-JBB.x86_64.rpm
# use globbing so that version updates don't break the build:
rpmextract gskcrypt64-*.linux.x86_64.rpm
rpmextract gskssl64-*.linux.x86_64.rpm
'';
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{,64}/* $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
'';
};
binPath = lib.makeBinPath ([ acl gnugrep procps ]
++ lib.optional enableGui jdk8);
in
buildEnv {
name = "tsm-client-${unwrapped.version}";
meta = meta // lib.attrsets.optionalAttrs enableGui {
mainProgram = "dsmj";
};
passthru = passthru // { inherit unwrapped; };
paths = [ unwrapped ];
nativeBuildInputs = [ 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 `enableGui` is set
# * 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.optionalString (!enableGui) "rm $out/bin/dsmj"}
for bin in $out/bin/*
do
target=$(readlink "$bin")
rm "$bin"
makeWrapper "$target" "$bin" \
--prefix PATH : "$out/dsm_dir:${binPath}" \
--set DSM_DIR $out/dsm_dir
done
'';
}

View file

@ -0,0 +1,58 @@
{ lib
, writeText
, runCommand
, tsm-client
}:
# Let the client try to connect to a server.
# We can't simulate a server, so there's no more to test.
let
# 192.0.0.8 is a "dummy address" according to RFC 7600
dsmSysCli = writeText "cli.dsm.sys" ''
defaultserver testserver
server testserver
commmethod v6tcpip
tcpserveraddress 192.0.0.8
nodename ARBITRARYNODENAME
'';
tsm-client_ = tsm-client.override { inherit dsmSysCli; };
env.nativeBuildInputs = [ tsm-client_ ];
versionString =
let
inherit (tsm-client_.passthru.unwrapped) version;
major = lib.versions.major version;
minor = lib.versions.minor version;
patch = lib.versions.patch version;
fixup = lib.lists.elemAt (lib.versions.splitVersion version) 3;
in
"Client Version ${major}, Release ${minor}, Level ${patch}.${fixup}";
in
runCommand "${tsm-client.name}-test-cli" env ''
set -o nounset
set -o pipefail
export DSM_LOG=$(mktemp -d ./dsm_log.XXXXXXXXXXX)
{ dsmc -optfile=/dev/null || true; } | tee dsmc-stdout
# does it report the correct version?
grep --fixed-strings '${versionString}' dsmc-stdout
# does it use the provided dsm.sys config file?
# if it does, it states the node's name
grep ARBITRARYNODENAME dsmc-stdout
# does it try (and fail) to connect to the server?
# if it does, it reports the "TCP/IP connection failure" error code
grep ANS1017E dsmc-stdout
grep ANS1017E $DSM_LOG/dsmerror.log
touch $out
''

View file

@ -0,0 +1,31 @@
{ pkgs, lib, 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 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;
};
}

View file

@ -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
];
};
}

View file

@ -0,0 +1,41 @@
{ pkgs, lib, 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 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;
};
}

View file

@ -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
];
};
}

View file

@ -0,0 +1,36 @@
{ lib, fetchFromGitHub, python3Packages, lzop, postgresql, pv }:
python3Packages.buildPythonApplication rec {
pname = "wal-e";
version = "1.1.1";
namePrefix = "";
src = fetchFromGitHub {
owner = "wal-e";
repo = "wal-e";
rev = "v${version}";
hash = "sha256-I6suHkAYzDtlNFNPH4SziY93Ryp+NTHkCBuojDvv+U4=";
};
# needs tox
doCheck = false;
propagatedBuildInputs = (with python3Packages; [
boto
gevent
google-cloud-storage
]) ++ [
postgresql
lzop
pv
];
meta = {
description = "A Postgres WAL-shipping disaster recovery and replication toolkit";
homepage = "https://github.com/wal-e/wal-e";
maintainers = [ ];
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,39 @@
{ lib, buildGoModule, fetchFromGitHub, brotli, libsodium, installShellFiles }:
buildGoModule rec {
pname = "wal-g";
version = "2.0.0";
src = fetchFromGitHub {
owner = "wal-g";
repo = "wal-g";
rev = "v${version}";
sha256 = "sha256-xltKchk7RtP5tkoUhnJqVb17WW6qW/lSFdHivCbW5zY=";
};
vendorSha256 = "sha256-w9AVcld8Gd1kYE2PkN8RVZ+/xlOZChKoWZFKvqhJuWI=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ brotli libsodium ];
subPackages = [ "main/pg" ];
tags = [ "brotli" "libsodium" ];
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
installShellCompletion --cmd wal-g \
--bash <($out/bin/wal-g completion bash) \
--zsh <($out/bin/wal-g completion zsh)
'';
meta = with lib; {
homepage = "https://github.com/wal-g/wal-g";
license = licenses.asl20;
description = "An archival restoration tool for PostgreSQL";
maintainers = with maintainers; [ marsam ];
};
}

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch
, cmake, protobufc
, libunwind, lzo, openssl, protobuf, zlib
}:
stdenv.mkDerivation rec {
pname = "zbackup";
version = "1.4.4";
src = fetchFromGitHub {
owner = "zbackup";
repo = "zbackup";
rev = version;
hash = "sha256-9Fk4EhEeQ2J4Kirc7oad4CzmW70Mmza6uozd87qfgZI=";
};
patches = [
# compare with https://github.com/zbackup/zbackup/pull/158;
# but that doesn't apply cleanly to this version
./protobuf-api-change.patch
];
# zbackup uses dynamic exception specifications which are not
# allowed in C++17
NIX_CFLAGS_COMPILE = [ "--std=c++14" ];
buildInputs = [ zlib openssl protobuf lzo libunwind ];
nativeBuildInputs = [ cmake protobufc ];
meta = {
description = "A versatile deduplicating backup tool";
homepage = "http://zbackup.org/";
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Plus;
};
}

View file

@ -0,0 +1,11 @@
--- a/backup_restorer.cc
+++ b/backup_restorer.cc
@@ -48,7 +48,7 @@
// TODO: this disables size checks for each separate message. Figure a better
// way to do this while keeping them enabled. It seems we need to create an
// instance of CodedInputStream for each message, but it might be expensive
- cis.SetTotalBytesLimit( backupData.size(), -1 );
+ cis.SetTotalBytesLimit( backupData.size() );
// Used when emitting chunks
string chunk;

View file

@ -0,0 +1,33 @@
{ lib, python3Packages }:
let
pythonPackages = python3Packages;
in
pythonPackages.buildPythonApplication rec {
pname = "zfs_autobackup";
version = "3.1";
src = pythonPackages.fetchPypi {
inherit pname version;
sha256 = "42c22001717b3d7cfdae6297fedc11b2dd1eb2a4bd25b6bb1c9232dd3b70ad67";
};
# argparse is part of the standardlib
prePatch = ''
substituteInPlace setup.py --replace "argparse" ""
'';
propagatedBuildInputs = with pythonPackages; [ colorama ];
# tests need zfs filesystem
doCheck = false;
pythonImportsCheck = [ "colorama" "argparse" ];
meta = with lib; {
homepage = "https://github.com/psy0rz/zfs_autobackup";
description = "ZFS backup, replicationand snapshot tool";
license = licenses.gpl3Only;
maintainers = with maintainers; [ mschneider ];
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchFromGitHub, go-md2man }:
stdenv.mkDerivation rec {
version = "1.3.0";
pname = "zfs-prune-snapshots";
src = fetchFromGitHub {
owner = "bahamas10";
repo = pname;
rev = "v${version}";
sha256 = "sha256-udzC4AUXk7h7HpRcz0V+kPECzATAYZtX8z2fvKPCZ/c=";
};
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 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;
};
}

View file

@ -0,0 +1,42 @@
{ buildPythonApplication, click, fetchPypi, hypothesis, mypy, pytest
, pytest-cov, pytest-runner, lib, stringcase
}:
buildPythonApplication rec {
pname = "zfs-replicate";
version = "1.2.3";
src = fetchPypi {
inherit pname version;
sha256 = "b2cb9d4670a6e12d14a446c10d857862e91af6e4526f607e08b41bde89953bb8";
};
checkInputs = [
hypothesis
mypy
pytest
pytest-cov
];
buildInputs = [
pytest-runner
];
propagatedBuildInputs = [
click
stringcase
];
doCheck = true;
checkPhase = ''
pytest --doctest-modules
'';
meta = with lib; {
homepage = "https://github.com/alunduil/zfs-replicate";
description = "ZFS Snapshot Replication";
license = licenses.bsd2;
maintainers = with maintainers; [ alunduil ];
};
}

View file

@ -0,0 +1,26 @@
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "zfsbackup";
version = "unstable-2020-09-30";
rev = "092f80846b23e02f99d2aa72d9d889eabfdcb053";
goPackagePath = "github.com/someone1/zfsbackup-go";
src = fetchFromGitHub {
owner = "someone1";
repo = "zfsbackup-go";
inherit rev;
sha256 = "1xiacaf4r9jkx0m8wjfis14cq622yhljldwkflh9ni3khax7dlgi";
};
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 ];
mainProgram = "zfsbackup-go";
};
}

1326
pkgs/tools/backup/zfsbackup/deps.nix generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,42 @@
{ lib, 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 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;
};
}

View file

@ -0,0 +1,68 @@
{ lib, 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.30.snapshot
Mojolicious' = perlPackages.buildPerlPackage rec {
pname = "Mojolicious";
version = "8.73";
src = fetchurl {
url = "mirror://cpan/authors/id/S/SR/SRI/${pname}-${version}.tar.gz";
sha256 = "118y2264f89bbp5ly2dh36xjq25jk85s2ssxa3y4gsgsk6sjzzk1";
};
};
MojoIOLoopForkCall' = 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' ];
};
perl' = perl.withPackages (p:
[ MojoIOLoopForkCall'
p.TAPParserSourceHandlerpgTAP
]);
version = "0.21.0";
sha256 = "1lg46rf2ahlclan29zx8ag5k4fjp28sc9l02z76f0pvdlj4qnihl";
in
stdenv.mkDerivation {
pname = "znapzend";
inherit version;
src = fetchFromGitHub {
owner = "oetiker";
repo = "znapzend";
rev = "v${version}";
inherit sha256;
};
buildInputs = [ wget perl' ];
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
'';
meta = with lib; {
description = "High performance open source ZFS backup with mbuffer and ssh support";
homepage = "https://www.znapzend.org";
license = licenses.gpl3;
maintainers = with maintainers; [ otwieracz ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,47 @@
{ lib
, buildGoModule
, fetchFromGitHub
, makeWrapper
, nixosTests
, openssh
}:
buildGoModule rec {
pname = "zrepl";
version = "0.5.0";
src = fetchFromGitHub {
owner = "zrepl";
repo = "zrepl";
rev = "v${version}";
sha256 = "4q/wwlF11HPDS2lTXUizJ3RFQ9sX5qNnWZUKAgnvDiE=";
};
vendorSha256 = "xToq9pKAxxknh4kE8S3uUg5ySPMbJkLftkMhofNxotc=";
subPackages = [ "." ];
nativeBuildInputs = [
makeWrapper
];
postInstall = ''
mkdir -p $out/lib/systemd/system
substitute dist/systemd/zrepl.service $out/lib/systemd/system/zrepl.service \
--replace /usr/local/bin/zrepl $out/bin/zrepl
wrapProgram $out/bin/zrepl \
--prefix PATH : ${lib.makeBinPath [ openssh ]}
'';
passthru.tests = {
inherit (nixosTests) zrepl;
};
meta = with lib; {
homepage = "https://zrepl.github.io/";
description = "A one-stop, integrated solution for ZFS replication";
platforms = platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [ cole-h danderson mdlayher ];
};
}