diff options
Diffstat (limited to 'pkgs/applications/backup')
-rw-r--r-- | pkgs/applications/backup/areca/default.nix | 57 | ||||
-rw-r--r-- | pkgs/applications/backup/areca/fix-javah-bug.diff | 24 | ||||
-rw-r--r-- | pkgs/applications/backup/deja-dup/default.nix | 77 | ||||
-rw-r--r-- | pkgs/applications/backup/deja-dup/fix-paths.patch | 11 | ||||
-rw-r--r-- | pkgs/applications/backup/pika-backup/borg-path.patch | 13 | ||||
-rw-r--r-- | pkgs/applications/backup/pika-backup/default.nix | 77 | ||||
-rw-r--r-- | pkgs/applications/backup/restique/default.nix | 41 | ||||
-rw-r--r-- | pkgs/applications/backup/urbackup-client/default.nix | 23 | ||||
-rw-r--r-- | pkgs/applications/backup/vdmfec/default.nix | 19 | ||||
-rw-r--r-- | pkgs/applications/backup/vorta/default.nix | 93 |
10 files changed, 435 insertions, 0 deletions
diff --git a/pkgs/applications/backup/areca/default.nix b/pkgs/applications/backup/areca/default.nix new file mode 100644 index 00000000000..816646ab6f1 --- /dev/null +++ b/pkgs/applications/backup/areca/default.nix @@ -0,0 +1,57 @@ +{ lib, stdenv, fetchurl, ant, jre, jdk, swt, acl, attr }: + +stdenv.mkDerivation rec { + pname = "areca"; + version = "7.5"; + + src = fetchurl { + url = "mirror://sourceforge/project/areca/areca-stable/areca-${version}/areca-${version}-src.tar.gz"; + sha256 = "1q4ha9s96c1syplxm04bh1v1gvjq16l4pa8w25w95d2ywwvyq1xb"; + }; + + sourceRoot = "."; + + buildInputs = [ jdk ant acl attr ]; + + patches = [ ./fix-javah-bug.diff ]; + + postPatch = '' + substituteInPlace build.xml --replace "/usr/lib/java/swt.jar" "${swt}/jars/swt.jar" + substituteInPlace build.xml --replace "gcc" "${stdenv.cc}/bin/gcc" + substituteInPlace areca.sh --replace "bin/" "" + substituteInPlace bin/areca_run.sh --replace "/usr/java" "${jre}/lib/openjdk" + substituteInPlace bin/areca_run.sh --replace "/usr/lib/java/swt.jar" "${swt}/jars/swt.jar" + + # Fix for NixOS/nixpkgs/issues/53716 + sed -i -e 's;^;#include <attr/attributes.h>;' jni/com_myJava_file_metadata_posix_jni_wrapper_FileAccessWrapper.c + substituteInPlace jni/com_myJava_file_metadata_posix_jni_wrapper_FileAccessWrapper.c --replace attr/xattr.h sys/xattr.h + + sed -i "s#^PROGRAM_DIR.*#PROGRAM_DIR=$out#g" bin/areca_run.sh + sed -i "s#^LIBRARY_PATH.*#LIBRARY_PATH=$out/lib:${lib.makeLibraryPath [ swt acl ]}#g" bin/areca_run.sh + + # https://sourceforge.net/p/areca/bugs/563/ + substituteInPlace bin/areca_run.sh --replace '[ "$JAVA_IMPL" = "java" ]' \ + '[[ "$JAVA_IMPL" = "java" || "$JAVA_IMPL" = "openjdk" ]]' + ''; + + buildPhase = "ant"; + + installPhase = '' + mkdir -p $out/bin $out/lib $out/translations + cp areca.sh $out/bin/areca + cp -r bin $out + cp -r lib $out + cp -r translations $out + cp COPYING $out + ''; + + meta = with lib; { + homepage = "http://www.areca-backup.org/"; + description = "An Open Source personal backup solution"; + # Builds fine but fails to launch. + broken = true; + license = licenses.gpl2; + maintainers = with maintainers; [ pSub ]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/applications/backup/areca/fix-javah-bug.diff b/pkgs/applications/backup/areca/fix-javah-bug.diff new file mode 100644 index 00000000000..5d5feaf9b94 --- /dev/null +++ b/pkgs/applications/backup/areca/fix-javah-bug.diff @@ -0,0 +1,24 @@ +diff --git a/build.xml b/build.xml +index 1ba08e0..9248b76 100644 +--- a/build.xml ++++ b/build.xml +@@ -56,10 +56,16 @@ + + <target name="compilejni" unless="isWindows"> + <description>JNI compilation task (builds libarecafs.so ... for unix-like operating systems only)</description> ++ + <!--Generate the JNI header--> +- <javah destdir="${root}/jni" force="yes" classpath="${root}/lib/areca.jar"> +- <class name="com.myJava.file.metadata.posix.jni.wrapper.FileAccessWrapper"/> +- </javah> ++ <exec executable="javah"> ++ <arg value="-d"/> ++ <arg value="${root}/jni"/> ++ <arg value="-force"/> ++ <arg value="-classpath"/> ++ <arg value="${root}/lib/areca.jar"/> ++ <arg value="com.myJava.file.metadata.posix.jni.wrapper.FileAccessWrapper"/> ++ </exec> + + <!-- Compile the JNI code --> + <exec dir="${root}/jni" executable="gcc"> diff --git a/pkgs/applications/backup/deja-dup/default.nix b/pkgs/applications/backup/deja-dup/default.nix new file mode 100644 index 00000000000..e2b208f891a --- /dev/null +++ b/pkgs/applications/backup/deja-dup/default.nix @@ -0,0 +1,77 @@ +{ lib, stdenv +, fetchFromGitLab +, substituteAll +, meson +, ninja +, pkg-config +, vala +, gettext +, itstool +, glib +, gtk4 +, coreutils +, libsoup_3 +, libsecret +, libadwaita +, wrapGAppsHook4 +, libgpg-error +, json-glib +, duplicity +}: + +stdenv.mkDerivation rec { + pname = "deja-dup"; + version = "43.2"; + + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "World"; + repo = pname; + rev = version; + sha256 = "sha256-iFrPx/m/nTdm7xVVd1SZh5QNpSqI+TCbMfx0/jLgc1c="; + }; + + patches = [ + (substituteAll { + src = ./fix-paths.patch; + inherit coreutils; + }) + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + vala + gettext + itstool + wrapGAppsHook4 + ]; + + buildInputs = [ + libsoup_3 + glib + gtk4 + libsecret + libadwaita + libgpg-error + json-glib + ]; + + mesonFlags = [ + "-Dduplicity_command=${duplicity}/bin/duplicity" + ]; + + meta = with lib; { + description = "A simple backup tool"; + longDescription = '' + Déjà Dup is a simple backup tool. It hides the complexity \ + of backing up the Right Way (encrypted, off-site, and regular) \ + and uses duplicity as the backend. + ''; + homepage = "https://wiki.gnome.org/Apps/DejaDup"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/backup/deja-dup/fix-paths.patch b/pkgs/applications/backup/deja-dup/fix-paths.patch new file mode 100644 index 00000000000..b7b26ee9a66 --- /dev/null +++ b/pkgs/applications/backup/deja-dup/fix-paths.patch @@ -0,0 +1,11 @@ +--- a/libdeja/duplicity/DuplicityInstance.vala ++++ b/libdeja/duplicity/DuplicityInstance.vala +@@ -114,7 +114,7 @@ internal class DuplicityInstance : Object + // We already are pretty sure we don't have other duplicities in our + // archive directories, because we use our own and we ensure we only have + // one deja-dup running at a time via DBus. +- Posix.system("/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock"); ++ Posix.system("@coreutils@/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock"); + + Process.spawn_async_with_pipes(null, real_argv, real_envp, + SpawnFlags.SEARCH_PATH | diff --git a/pkgs/applications/backup/pika-backup/borg-path.patch b/pkgs/applications/backup/pika-backup/borg-path.patch new file mode 100644 index 00000000000..c4ed649ffc9 --- /dev/null +++ b/pkgs/applications/backup/pika-backup/borg-path.patch @@ -0,0 +1,13 @@ +diff --git a/src/borg/utils.rs b/src/borg/utils.rs +index 4e30913..30d7d6f 100644 +--- a/src/borg/utils.rs ++++ b/src/borg/utils.rs +@@ -223,7 +223,7 @@ impl BorgCall { + } + + pub fn cmd(&self) -> Command { +- let mut cmd = Command::new("borg"); ++ let mut cmd = Command::new("@borg@"); + + cmd.args(self.args()) + .stderr(Stdio::piped()) diff --git a/pkgs/applications/backup/pika-backup/default.nix b/pkgs/applications/backup/pika-backup/default.nix new file mode 100644 index 00000000000..e0b8b2fca14 --- /dev/null +++ b/pkgs/applications/backup/pika-backup/default.nix @@ -0,0 +1,77 @@ +{ lib +, stdenv +, fetchFromGitLab +, rustPlatform +, substituteAll +, desktop-file-utils +, meson +, ninja +, pkg-config +, python3 +, wrapGAppsHook +, borgbackup +, dbus +, gdk-pixbuf +, glib +, gtk3 +, libhandy +}: + +stdenv.mkDerivation rec { + pname = "pika-backup"; + version = "0.3.5"; + + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "World"; + repo = "pika-backup"; + rev = "v${version}"; + sha256 = "sha256-8jT3n+bTNjhm64AMS24Ju+San75ytfqFXloH/TOgO1g="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + sha256 = "198bs4z7l22sh8ck7v46s45mj8zpfbg03n1xzc6pnafdd8hf3q15"; + }; + + patches = [ + (substituteAll { + src = ./borg-path.patch; + borg = "${borgbackup}/bin/borg"; + }) + ]; + + postPatch = '' + patchShebangs build-aux + ''; + + nativeBuildInputs = [ + desktop-file-utils + meson + ninja + pkg-config + python3 + wrapGAppsHook + ] ++ (with rustPlatform; [ + cargoSetupHook + rust.cargo + rust.rustc + ]); + + buildInputs = [ + dbus + gdk-pixbuf + glib + gtk3 + libhandy + ]; + + meta = with lib; { + description = "Simple backups based on borg"; + homepage = "https://wiki.gnome.org/Apps/PikaBackup"; + changelog = "https://gitlab.gnome.org/World/pika-backup/-/blob/v${version}/CHANGELOG.md"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/applications/backup/restique/default.nix b/pkgs/applications/backup/restique/default.nix new file mode 100644 index 00000000000..744379f213d --- /dev/null +++ b/pkgs/applications/backup/restique/default.nix @@ -0,0 +1,41 @@ +{ lib +, mkDerivation +, fetchFromGitea +, cmake +, libsecret +, qtkeychain +, restic +}: + +mkDerivation rec { + pname = "restique"; + version = "unstable-2021-05-03"; + + src = fetchFromGitea { + domain = "git.srcbox.net"; + owner = "stefan"; + repo = "restique"; + rev = "f83ea63c2e2f2a41e845f54c7fe2c391a528a121"; + sha256 = "0j1qihv7hd90xkfm4ksv74q6m7cq781fbdnc3l4spcd7h2p8lh0z"; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + libsecret + qtkeychain + ]; + + qtWrapperArgs = [ + "--prefix" "PATH" ":" (lib.makeBinPath [ restic ]) + ]; + + meta = with lib; { + description = "Restic GUI for Desktop/Laptop Backups"; + homepage = "https://git.srcbox.net/stefan/restique"; + license = with licenses; [ gpl3Plus cc-by-sa-40 cc0 ]; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/applications/backup/urbackup-client/default.nix b/pkgs/applications/backup/urbackup-client/default.nix new file mode 100644 index 00000000000..16ae8fcf3e8 --- /dev/null +++ b/pkgs/applications/backup/urbackup-client/default.nix @@ -0,0 +1,23 @@ +{ stdenv, lib, fetchzip, wxGTK30, zlib, zstd }: + +stdenv.mkDerivation rec { + pname = "urbackup-client"; + version = "2.4.11"; + + src = fetchzip { + url = "https://hndl.urbackup.org/Client/${version}/urbackup-client-${version}.tar.gz"; + sha256 = "0cciy9v1pxj9qaklpbhp2d5rdbkmfm74vhpqx6b4phww0f10wvzh"; + }; + + configureFlags = [ "--enable-embedded-cryptopp" ]; + buildInputs = [ wxGTK30 zlib zstd ]; + + meta = with lib; { + description = "An easy to setup Open Source client/server backup system"; + longDescription = "An easy to setup Open Source client/server backup system, that through a combination of image and file backups accomplishes both data safety and a fast restoration time"; + homepage = "https://www.urbackup.org/index.html"; + license = licenses.agpl3; + platforms = platforms.linux; + maintainers = [ maintainers.mgttlinger ]; + }; +} diff --git a/pkgs/applications/backup/vdmfec/default.nix b/pkgs/applications/backup/vdmfec/default.nix new file mode 100644 index 00000000000..2f9b4a4bfae --- /dev/null +++ b/pkgs/applications/backup/vdmfec/default.nix @@ -0,0 +1,19 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "vdmfec"; + version = "1.0"; + + src = fetchurl { + url = "http://members.tripod.com/professor_tom/archives/${pname}-${version}.tgz"; + sha256 = "0i7q4ylx2xmzzq778anpkj4nqir5gf573n1lbpxnbc10ymsjq2rm"; + }; + + meta = with lib; { + description = "A program that adds error correction blocks"; + homepage = "http://members.tripod.com/professor_tom/archives/index.html"; + maintainers = [ maintainers.ar1a ]; + license = with licenses; [ gpl2 /* for vdmfec */ bsd2 /* for fec */ ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/backup/vorta/default.nix b/pkgs/applications/backup/vorta/default.nix new file mode 100644 index 00000000000..271efc0283d --- /dev/null +++ b/pkgs/applications/backup/vorta/default.nix @@ -0,0 +1,93 @@ +{ lib +, python3Packages +, fetchFromGitHub +, wrapQtAppsHook +, borgbackup +, qt5 +}: + +python3Packages.buildPythonApplication rec { + pname = "vorta"; + version = "0.8.3"; + + src = fetchFromGitHub { + owner = "borgbase"; + repo = "vorta"; + rev = "v${version}"; + sha256 = "06sb24pimq9ckdkp9hzp4r9d3i21kxacsx5b7x9q99qcwf7h6372"; + }; + + nativeBuildInputs = [ wrapQtAppsHook ]; + + propagatedBuildInputs = with python3Packages; [ + paramiko + peewee + pyqt5 + python-dateutil + psutil + qdarkstyle + secretstorage + appdirs + setuptools + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace setuptools_git "" \ + --replace pytest-runner "" + + substituteInPlace src/vorta/assets/metadata/com.borgbase.Vorta.desktop \ + --replace Exec=vorta "Exec=$out/bin/vorta" \ + --replace com.borgbase.Vorta "com.borgbase.Vorta-symbolic" + ''; + + postInstall = '' + install -Dm644 src/vorta/assets/metadata/com.borgbase.Vorta.desktop $out/share/applications/com.borgbase.Vorta.desktop + ''; + + preFixup = '' + makeWrapperArgs+=( + "''${qtWrapperArgs[@]}" + --prefix PATH : ${lib.makeBinPath [ borgbackup ]} + ) + ''; + + checkInputs = with python3Packages; [ + pytest-qt + pytest-mock + pytestCheckHook + ]; + + preCheck = '' + export HOME=$(mktemp -d) + # For tests/test_misc.py::test_autostart + mkdir -p $HOME/.config/autostart + export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}" + export QT_QPA_PLATFORM=offscreen + ''; + + disabledTestPaths = [ + "tests/test_archives.py" + "tests/test_borg.py" + "tests/test_lock.py" + "tests/test_notifications.py" + ]; + + disabledTests = [ + "diff_archives_dict_issue-Users" + "diff_archives-test" + "test_repo_unlink" + "test_repo_add_success" + "test_ssh_dialog" + "test_create" + "test_scheduler_create_backup" + ]; + + meta = with lib; { + license = licenses.gpl3Only; + homepage = "https://vorta.borgbase.com/"; + maintainers = with maintainers; [ ma27 ]; + description = "Desktop Backup Client for Borg"; + platforms = platforms.linux; + }; +} |