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,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;
};
}

View file

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

View file

@ -0,0 +1,79 @@
{ lib, stdenv
, fetchFromGitLab
, substituteAll
, meson
, ninja
, pkg-config
, vala
, gettext
, itstool
, desktop-file-utils
, glib
, gtk4
, coreutils
, libsoup_3
, libsecret
, libadwaita
, wrapGAppsHook4
, libgpg-error
, json-glib
, duplicity
}:
stdenv.mkDerivation rec {
pname = "deja-dup";
version = "43.3";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = pname;
rev = version;
sha256 = "sha256-HOIBAzR+7OZ1RO+MSpCQKShcikdtWCjdMUO2rE2TxiM=";
};
patches = [
(substituteAll {
src = ./fix-paths.patch;
inherit coreutils;
})
];
nativeBuildInputs = [
meson
ninja
pkg-config
vala
gettext
itstool
desktop-file-utils
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;
};
}

View file

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

View file

@ -0,0 +1,22 @@
diff --git a/src/borg/process.rs b/src/borg/process.rs
index 63ea0ee..e3535e0 100644
--- a/src/borg/process.rs
+++ b/src/borg/process.rs
@@ -203,7 +203,7 @@ impl BorgCall {
}
pub fn cmd(&self) -> Result<process::Command> {
- let mut cmd = process::Command::new("borg");
+ let mut cmd = process::Command::new("@borg@");
cmd.envs([self.set_password()?]);
@@ -221,7 +221,7 @@ impl BorgCall {
}
pub fn cmd_async(&self) -> Result<async_process::Command> {
- let mut cmd = async_process::Command::new("borg");
+ let mut cmd = async_process::Command::new("@borg@");
cmd.envs([self.set_password()?]);

View file

@ -0,0 +1,82 @@
{ lib
, stdenv
, fetchFromGitLab
, fetchpatch
, rustPlatform
, substituteAll
, desktop-file-utils
, itstool
, meson
, ninja
, pkg-config
, python3
, wrapGAppsHook4
, borgbackup
, gtk4
, libadwaita
, libsecret
}:
stdenv.mkDerivation rec {
pname = "pika-backup";
version = "0.4.0";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "pika-backup";
rev = "v${version}";
hash = "sha256-vQ0hlwsrY0WOUc/ppleE+kKRGHPt/ScEChXrkukln3U=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-IKUh5gkXTpmMToDaec+CpCIQqJjwJM2ZrmGQhZeTDsg=";
};
patches = [
(substituteAll {
src = ./borg-path.patch;
borg = "${borgbackup}/bin/borg";
})
(fetchpatch {
name = "use-gtk4-update-icon-cache.patch";
url = "https://gitlab.gnome.org/World/pika-backup/-/merge_requests/64.patch";
hash = "sha256-AttGQGWealvTIvPwBl5M6FiC4Al/UD4/XckUAxM38SE=";
})
];
postPatch = ''
patchShebangs build-aux
'';
nativeBuildInputs = [
desktop-file-utils
itstool
meson
ninja
pkg-config
python3
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
buildInputs = [
gtk4
libadwaita
libsecret
];
meta = with lib; {
description = "Simple backups based on borg";
homepage = "https://apps.gnome.org/app/org.gnome.World.PikaBackup";
changelog = "https://gitlab.gnome.org/World/pika-backup/-/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
platforms = platforms.linux;
};
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,93 @@
{ lib
, python3Packages
, fetchFromGitHub
, wrapQtAppsHook
, borgbackup
, qt5
}:
python3Packages.buildPythonApplication rec {
pname = "vorta";
version = "0.8.6";
src = fetchFromGitHub {
owner = "borgbase";
repo = "vorta";
rev = "refs/tags/v${version}";
sha256 = "sha256-J/Cl+et4AS44PPG2SmOHosKVw0XtOyNL0qJk68OHwQc=";
};
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;
};
}