diff --git a/pkgs/by-name/ca/cartridges/package.nix b/pkgs/by-name/ca/cartridges/package.nix index e1ad5fc1de7a..224e13a8744b 100644 --- a/pkgs/by-name/ca/cartridges/package.nix +++ b/pkgs/by-name/ca/cartridges/package.nix @@ -1,67 +1,53 @@ { + lib, + fetchFromGitHub, + python3Packages, blueprint-compiler, desktop-file-utils, - fetchFromGitHub, gobject-introspection, - lib, libadwaita, meson, ninja, - python3Packages, - stdenv, wrapGAppsHook4, - nix-update-script, }: -stdenv.mkDerivation (finalAttrs: { +python3Packages.buildPythonApplication rec { pname = "cartridges"; version = "2.8.5"; + pyproject = false; src = fetchFromGitHub { owner = "kra-mo"; repo = "cartridges"; - rev = "v${finalAttrs.version}"; + rev = "v${version}"; hash = "sha256-7T+q3T8z8SCpAn3ayodZeETOsTwL+hhVWzY2JyBEoi4="; }; - pythonPath = with python3Packages; [ - pillow - pygobject3 - pyyaml - requests - ]; - # TODO: remove this when #286814 hits master mesonFlags = [ "-Dtiff_compression=jpeg" ]; - buildInputs = [ - libadwaita - (python3Packages.python.withPackages (_: finalAttrs.pythonPath)) - ]; - nativeBuildInputs = [ blueprint-compiler desktop-file-utils gobject-introspection meson ninja - python3Packages.wrapPython wrapGAppsHook4 ]; + buildInputs = [ libadwaita ]; + + dependencies = with python3Packages; [ + pillow + pygobject3 + pyyaml + requests + ]; + dontWrapGApps = true; + makeWrapperArgs = [ ''''${gappsWrapperArgs[@]}'' ]; - postFixup = '' - makeWrapperArgs+=("''${gappsWrapperArgs[@]}") - wrapPythonPrograms "$out/bin" "$out" "$pythonPath" - ''; - - passthru = { - updateScript = nix-update-script { }; - }; - - meta = with lib; { + meta = { description = "GTK4 + Libadwaita game launcher"; - mainProgram = "cartridges"; longDescription = '' A simple game launcher for all of your games. It has support for importing games from Steam, Lutris, Heroic @@ -69,8 +55,10 @@ stdenv.mkDerivation (finalAttrs: { You can sort and hide games or download cover art from SteamGridDB. ''; homepage = "https://apps.gnome.org/Cartridges/"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.getchoo ]; - platforms = platforms.linux; + changelog = "https://github.com/kra-mo/cartridges/releases/tag/${src.rev}"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ getchoo ]; + mainProgram = "cartridges"; + platforms = lib.platforms.linux; }; -}) +}