From 368f21fed1bd8245fef997ef22e6829974869117 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Thu, 1 Aug 2024 19:51:57 +0200 Subject: [PATCH] quba: init at 1.4.0 --- pkgs/by-name/qu/quba/package.nix | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/by-name/qu/quba/package.nix diff --git a/pkgs/by-name/qu/quba/package.nix b/pkgs/by-name/qu/quba/package.nix new file mode 100644 index 000000000000..cfd80c6bdbe8 --- /dev/null +++ b/pkgs/by-name/qu/quba/package.nix @@ -0,0 +1,39 @@ +{ + lib, + appimageTools, + fetchurl, +}: + +let + version = "1.4.0"; + pname = "quba"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://github.com/ZUGFeRD/quba-viewer/releases/download/v${version}/Quba-${version}.AppImage"; + hash = "sha256-EsTF7W1np5qbQQh3pdqsFe32olvGK3AowGWjqHPEfoM="; + }; + + appimageContents = appimageTools.extractType1 { inherit name src; }; +in +appimageTools.wrapType1 { + inherit name src; + + extraInstallCommands = '' + mv $out/bin/${name} $out/bin/${pname} + install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace-fail 'Exec=AppRun' 'Exec=${pname}' + cp -r ${appimageContents}/usr/share/icons $out/share + ''; + + meta = { + description = "Viewer for electronic invoices"; + homepage = "https://github.com/ZUGFeRD/quba-viewer"; + downloadPage = "https://github.com/ZUGFeRD/quba-viewer/releases"; + license = lib.licenses.asl20; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ onny ]; + platforms = [ "x86_64-linux" ]; + }; +}