20 stdenv.mkDerivation rec {
25 url = "https://digint.ch/download/btrbk/releases/${pname}-${version}.tar.xz";
26 sha256 = "AuKsZHyRhGMgLL5ge7lVV6T3/SNwaRJDM8VNpbK7t2s=";
34 buildInputs = with perlPackages; [
40 for f in $(find . -name Makefile); do
41 substituteInPlace "$f" \
42 --replace "/usr" "$out" \
43 --replace "/etc" "$out/etc"
46 # Tainted Mode disables PERL5LIB
47 substituteInPlace btrbk \
48 --replace "perl -T" "perl" \
49 --replace "\$0" "\$ENV{'program_name'}"
51 # Fix SSH filter script
52 sed -i '/^export PATH/d' ssh_filter_btrbk.sh
53 substituteInPlace ssh_filter_btrbk.sh --replace logger ${util-linux}/bin/logger
57 wrapProgram $out/bin/btrbk \
58 --set PERL5LIB $PERL5LIB \
59 --run 'export program_name=$0' \
79 passthru.updateScript = genericUpdater {
80 versionLister = writeShellScript "btrbk-versionLister" ''
81 ${curl}/bin/curl -s https://digint.ch/download/btrbk/releases/ | ${perl}/bin/perl -lne 'print $1 if /btrbk-([0-9.]*)\.tar/'
86 description = "Backup tool for btrfs subvolumes";
87 homepage = "https://digint.ch/btrbk";
88 license = licenses.gpl3Only;
89 platforms = platforms.unix;
90 maintainers = with maintainers; [ asymmetric ];
91 mainProgram = "btrbk";