Open v411e opened 3 months ago
Currently I came up with:
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
makeWrapper,
dpkg,
xorg,
alsa-lib,
libdrm,
cairo,
gtk3,
pango,
nss,
mesa,
}: let
pname = "kopia-ui";
version = "0.17.0";
src =
fetchurl
{
aarch64-linux = {
url = "https://github.com/kopia/kopia/releases/download/v${version}/${pname}_${version}_arm64.deb";
hash = "sha256-itebPI1ccb3j4TBqCEVO8a7aRJH5v3FQw1Rw8/vxOt8=";
};
x86_64-linux = {
url = "https://github.com/kopia/kopia/releases/download/v${version}/${pname}_${version}_amd64.deb";
hash = "sha256-e/nvvAQhJoacOgTe9zI+F3rwAn/lKRztyeCeQ6Ito+Q=";
};
}
.${stdenv.system}
or (throw "${pname}-${version}: ${stdenv.system} is unsupported.");
buildInputs = with xorg;
[
libXrandr
libXdamage
libXfixes
libXcomposite
]
++ [
libdrm
cairo
gtk3
pango
nss
mesa # for libgbm
alsa-lib # libasound.so.2
];
meta = with lib; {
description = "UI version of the cross-platform backup tool kopia";
homepage = "https://github.com/kopia/kopia";
license = licenses.mit;
maintainers = with maintainers; [luftmensch-luftmensch];
changelog = "https://github.com/kopia/kopia/releases/tag/v${version}";
mainProgram = "kopia-ui";
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
in
stdenv.mkDerivation {
inherit pname version src buildInputs meta;
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
unpackPhase = ''
${dpkg}/bin/dpkg-deb -x $src .
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r opt $out/opt
cp -r usr/share $out/share
substituteInPlace $out/share/applications/kopia-ui.desktop \
--replace "/opt/KopiaUI/kopia-ui" "$out/bin/kopia-ui"
makeWrapper $out/opt/KopiaUI/kopia-ui $out/bin/kopia-ui
runHook postInstall
'';
}
But when I try to launch it, it gaves me:
Checking for beta autoupdate feature for deb/rpm distributions
Found package-type: deb
(kopia-ui:3252169): Gtk-WARNING **: 11:40:49.616: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
[3252169:0514/114049.645702:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: Interfaccia «org.freedesktop.portal.FileChooser» inesistente
[3252169:0514/114049.645723:ERROR:select_file_dialog_linux_portal.cc(286)] Failed to read portal version property
[3252187:0100/000000.175461:ERROR:zygote_linux.cc(625)] Zygote could not fork: process_type gpu-process numfds 3 child_pid -1
[3252187:0100/000000.175733:ERROR:zygote_linux.cc(657)] write: Broken pipe (32)
fish: Job 1, './kopia-ui' terminated by signal SIGTRAP (Trace or breakpoint trap)
Feel free to suggest changes c:
Here are the build instructions, just for future reference https://github.com/kopia/kopia/blob/master/BUILD.md#kopiaui-app
Project description
Kopia is a backup-tool and the CLI already has a package in nixpkgs where it is described as
Kopia has two variants and the GUI-version is currently missing in nixpkgs.
Metadata
Add a :+1: reaction to issues you find important.