From cd587988357f3db3af8e8b66d6b3995cc39c849f Mon Sep 17 00:00:00 2001 From: Icy-Thought Date: Tue, 13 Jun 2023 08:18:21 +0200 Subject: [PATCH] upscayl: init at 2.5.5 --- .../applications/graphics/upscayl/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/applications/graphics/upscayl/default.nix diff --git a/pkgs/applications/graphics/upscayl/default.nix b/pkgs/applications/graphics/upscayl/default.nix new file mode 100644 index 000000000000..f4ec256aecb8 --- /dev/null +++ b/pkgs/applications/graphics/upscayl/default.nix @@ -0,0 +1,42 @@ +{ + appimageTools, + fetchurl, + lib, +}: let + pname = "upscayl"; + version = "2.5.5"; + + src = fetchurl { + url = "https://github.com/upscayl/upscayl/releases/download/v${version}/upscayl-${version}-linux.AppImage"; + hash = "sha256-qpLxOGphR9iHvtb8AZZaMict/g8wLkL7Dhr4mt3LZdk="; + }; + + appimageContents = appimageTools.extractType2 { + inherit pname version src; + }; +in + appimageTools.wrapType2 { + inherit pname version src; + + extraPkgs = pkgs: with pkgs; [vulkan-headers vulkan-loader]; + + extraInstallCommands = '' + mkdir -p $out/share/{applications,pixmaps} + + cp ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop + cp ${appimageContents}/${pname}.png $out/share/pixmaps/${pname}.png + + mv $out/bin/${pname}-${version} $out/bin/${pname} + + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname}' + ''; + + meta = with lib; { + description = "Free and Open Source AI Image Upscaler"; + homepage = "https://upscayl.github.io/"; + maintainers = with maintainers; [icy-thought]; + license = licenses.agpl3Only; + platforms = platforms.linux; + }; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e26435ed865e..7d6c1f6b99c0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27984,6 +27984,8 @@ with pkgs; upower = callPackage ../os-specific/linux/upower { }; + upscayl = callPackage ../applications/graphics/upscayl { }; + usbguard = callPackage ../os-specific/linux/usbguard { }; usbguard-notifier = callPackage ../os-specific/linux/usbguard-notifier { };