Files
nixpkgs/pkgs/by-name/up/upscaler/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

93 lines
1.8 KiB
Nix

{
lib,
fetchFromGitLab,
glib,
gtk4,
meson,
ninja,
gitUpdater,
desktop-file-utils,
appstream,
blueprint-compiler,
python3Packages,
pkg-config,
libadwaita,
wrapGAppsHook4,
upscayl-ncnn,
}:
python3Packages.buildPythonApplication rec {
pname = "upscaler";
version = "1.6.0";
pyproject = false; # meson instead of pyproject
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "Upscaler";
rev = version;
hash = "sha256-OsycWrMR/SEZTlNQFd0wKF4CQNXKV/mBHaqiliMFw00=";
};
passthru.updateScript = gitUpdater { };
postPatch = ''
substituteInPlace upscaler/window.py \
--replace-fail '"upscayl-bin",' '"${lib.getExe upscayl-ncnn}",'
'';
strictDeps = true;
nativeBuildInputs = [
wrapGAppsHook4
meson
ninja
desktop-file-utils
appstream
blueprint-compiler
pkg-config
gtk4
glib
];
dependencies = with python3Packages; [
pygobject3
pillow
vulkan
];
buildInputs = [
libadwaita
upscayl-ncnn
];
mesonFlags = [
(lib.mesonBool "network_tests" false)
];
# NOTE: `postCheck` is intentionally not used here, as the entire checkPhase
# is skipped by `buildPythonApplication`
# https://github.com/NixOS/nixpkgs/blob/9d4343b7b27a3e6f08fc22ead568233ff24bbbde/pkgs/development/interpreters/python/mk-python-derivation.nix#L296
postInstallCheck = ''
mesonCheckPhase
'';
dontWrapGApps = true;
makeWrapperArgs = [ "\${gappsWrapperArgs[@]}" ];
meta = {
description = "Upscale and enhance images";
homepage = "https://tesk.page/upscaler";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
grimmauld
getchoo
aleksana
];
mainProgram = "upscaler";
platforms = lib.platforms.linux;
};
}