diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix index ab053e13b806..45c25c2550a6 100644 --- a/pkgs/development/python-modules/gst-python/default.nix +++ b/pkgs/development/python-modules/gst-python/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { pname = "gst-python"; - version = "1.26.11"; + version = "1.28.4"; pyproject = false; @@ -32,14 +32,13 @@ buildPythonPackage rec { src = fetchurl { url = "https://gstreamer.freedesktop.org/src/gst-python/gst-python-${version}.tar.xz"; - hash = "sha256-ETFrp2m1bSbYsUZMcZipkkyurkgTT321kXH68ac9xDY="; + hash = "sha256-xOs4JyC0RD+4AaU0GN/wvUzXR4cW1c7Uk1BKZ1tNCf0="; }; - # https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4322 - postPatch = '' - substituteInPlace testsuite/meson.build \ - --replace-fail "['gstinit', 'test_gst_init.py']," "" - ''; + patches = [ + # https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9918#note_3530752 + ./fix-test-plugin-imports.patch + ]; # Python 2.x is not supported. disabled = !isPy3k; @@ -103,6 +102,6 @@ buildPythonPackage rec { homepage = "https://gstreamer.freedesktop.org"; description = "Python bindings for GStreamer"; license = lib.licenses.lgpl2Plus; - maintainers = [ ]; + maintainers = with lib.maintainers; [ tmarkus ]; }; } diff --git a/pkgs/development/python-modules/gst-python/fix-test-plugin-imports.patch b/pkgs/development/python-modules/gst-python/fix-test-plugin-imports.patch new file mode 100644 index 000000000000..a08142a85a03 --- /dev/null +++ b/pkgs/development/python-modules/gst-python/fix-test-plugin-imports.patch @@ -0,0 +1,22 @@ +diff --git a/subprojects/gst-python/testsuite/test_plugin.py b/subprojects/gst-python/testsuite/test_plugin.py +index 3ab299d54c..4ed1e85c82 100644 +--- a/testsuite/test_plugin.py ++++ b/testsuite/test_plugin.py +@@ -18,14 +18,14 @@ + # License along with this library; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +-from gi.repository import Gst +-import gi +-from common import TestCase, unittest + import overrides_hack + overrides_hack + ++from common import TestCase, unittest + ++import gi + gi.require_version("Gst", "1.0") ++from gi.repository import Gst + + + class TestPlugin(TestCase):