diff --git a/pkgs/by-name/sh/showtime/package.nix b/pkgs/by-name/sh/showtime/package.nix index de7831564880..85fed910f701 100644 --- a/pkgs/by-name/sh/showtime/package.nix +++ b/pkgs/by-name/sh/showtime/package.nix @@ -3,15 +3,16 @@ appstream, blueprint-compiler, desktop-file-utils, - fetchFromGitLab, + fetchurl, + fetchpatch, glib, + gnome, gobject-introspection, gst_all_1, gtk4, libadwaita, meson, ninja, - nix-update-script, pkg-config, python3Packages, wrapGAppsHook4, @@ -19,20 +20,29 @@ python3Packages.buildPythonApplication rec { pname = "showtime"; - version = "48.1"; + version = "49.0"; pyproject = false; - src = fetchFromGitLab { - domain = "gitlab.gnome.org"; - group = "GNOME"; - owner = "Incubator"; - repo = "showtime"; - rev = "refs/tags/${version}"; - hash = "sha256-uk3KgiLsYjqBhlKssnkWO6D4ufwJb/o+rQYSA7pa1lU="; + src = fetchurl { + url = "mirror://gnome/sources/showtime/${lib.versions.major version}/showtime-${version}.tar.xz"; + hash = "sha256-Wryvl6telTADgoKEhYjozmwmFztzA+9nVr69sLIO05g="; }; + patches = [ + # Fix startup crash when missing state directory. + # https://gitlab.gnome.org/GNOME/showtime/-/merge_requests/80 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/showtime/-/commit/a5d57a6b023664c9dc5aeb55a3467a8b56e1b7bc.patch"; + hash = "sha256-IUkopJ3J381+9MnvaItx7dn9NAVrqO9y4LjgPh8MU/M="; + }) + ]; + strictDeps = true; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ appstream blueprint-compiler @@ -64,8 +74,15 @@ python3Packages.buildPythonApplication rec { pythonImportsCheck = [ "showtime" ]; + preInstallCheck = '' + export XDG_DATA_DIRS="${glib.makeSchemaDataDirPath "$out" "$name"}:$XDG_DATA_DIRS" + export HOME="$TEMPDIR" + ''; + passthru = { - updateScript = nix-update-script { }; + updateScript = gnome.updateScript { + packageName = "showtime"; + }; }; meta = {