diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/applications/backup | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/backup')
6 files changed, 227 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/backup/areca/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/backup/areca/default.nix new file mode 100644 index 000000000000..b4d644430dd1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/applications/backup/areca/default.nix @@ -0,0 +1,54 @@ +{ stdenv, fetchurl, ant, jre, jdk, swt, acl, attr }: + +stdenv.mkDerivation { + name = "areca-7.5"; + + src = fetchurl { + url = "mirror://sourceforge/project/areca/areca-stable/areca-7.5/areca-7.5-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:${stdenv.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 stdenv.lib; { + homepage = "http://www.areca-backup.org/"; + description = "An Open Source personal backup solution"; + license = licenses.gpl2; + maintainers = with maintainers; [ pSub ]; + platforms = with platforms; linux; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/applications/backup/areca/fix-javah-bug.diff b/infra/libkookie/nixpkgs/pkgs/applications/backup/areca/fix-javah-bug.diff new file mode 100644 index 000000000000..5d5feaf9b943 --- /dev/null +++ b/infra/libkookie/nixpkgs/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/infra/libkookie/nixpkgs/pkgs/applications/backup/deja-dup/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/backup/deja-dup/default.nix new file mode 100644 index 000000000000..ad4fc9728be2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/applications/backup/deja-dup/default.nix @@ -0,0 +1,77 @@ +{ stdenv +, fetchFromGitLab +, substituteAll +, meson +, ninja +, pkg-config +, vala +, gettext +, itstool +, glib +, gtk3 +, coreutils +, libsoup +, libsecret +, libhandy +, wrapGAppsHook +, libgpgerror +, json-glib +, duplicity +}: + +stdenv.mkDerivation rec { + pname = "deja-dup"; + version = "42.4"; + + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "World"; + repo = pname; + rev = version; + sha256 = "c4E6mHYVb8TWVTVlmHidcLa9ebHJ27iStsNNLJhY8vY="; + }; + + patches = [ + (substituteAll { + src = ./fix-paths.patch; + inherit coreutils; + }) + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + vala + gettext + itstool + wrapGAppsHook + ]; + + buildInputs = [ + libsoup + glib + gtk3 + libsecret + libhandy + libgpgerror + json-glib + ]; + + mesonFlags = [ + "-Dduplicity_command=${duplicity}/bin/duplicity" + ]; + + meta = with stdenv.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/infra/libkookie/nixpkgs/pkgs/applications/backup/deja-dup/fix-paths.patch b/infra/libkookie/nixpkgs/pkgs/applications/backup/deja-dup/fix-paths.patch new file mode 100644 index 000000000000..26126fdc9d56 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/applications/backup/deja-dup/fix-paths.patch @@ -0,0 +1,11 @@ +--- a/libdeja/tools/duplicity/DuplicityInstance.vala ++++ b/libdeja/tools/duplicity/DuplicityInstance.vala +@@ -159,7 +159,7 @@ + // 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/infra/libkookie/nixpkgs/pkgs/applications/backup/vdmfec/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/backup/vdmfec/default.nix new file mode 100644 index 000000000000..1366bb484a91 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/applications/backup/vdmfec/default.nix @@ -0,0 +1,19 @@ +{ 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 stdenv.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/infra/libkookie/nixpkgs/pkgs/applications/backup/vorta/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/backup/vorta/default.nix new file mode 100644 index 000000000000..fc7e6c0fc359 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/applications/backup/vorta/default.nix @@ -0,0 +1,42 @@ +{ buildPythonApplication, fetchFromGitHub, lib, paramiko, peewee, pyqt5 +, python-dateutil, APScheduler, psutil, qdarkstyle, secretstorage +, appdirs, setuptools, qt5 +}: + +buildPythonApplication rec { + pname = "vorta"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "borgbase"; + repo = "vorta"; + rev = "v${version}"; + sha256 = "069fq5gv324l2ap3g6m6i12lhq1iqm27dsmaagyc3sva945j0gxw"; + }; + + postPatch = '' + sed -i -e '/setuptools_git/d' -e '/pytest-runner/d' setup.cfg + ''; + + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; + + propagatedBuildInputs = [ + paramiko peewee pyqt5 python-dateutil APScheduler psutil qdarkstyle + secretstorage appdirs setuptools + ]; + + # QT setup in tests broken. + doCheck = false; + + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; + + meta = with lib; { + license = licenses.gpl3; + homepage = "https://vorta.borgbase.com/"; + maintainers = with maintainers; [ ma27 ]; + description = "Desktop Backup Client for Borg"; + platforms = platforms.linux; + }; +} |