2020-03-17 01:30:05 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, fetchurl
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, stdenv
|
|
|
|
, pkgconfig
|
|
|
|
, python
|
|
|
|
, pygobject3
|
|
|
|
, gobject-introspection
|
|
|
|
, gst-plugins-base
|
|
|
|
, isPy3k
|
2020-04-10 09:20:00 +00:00
|
|
|
, fetchpatch
|
2014-02-02 15:07:03 +00:00
|
|
|
}:
|
|
|
|
|
2020-03-17 01:30:05 +00:00
|
|
|
buildPythonPackage rec {
|
2017-08-13 19:42:30 +00:00
|
|
|
pname = "gst-python";
|
2020-03-17 01:38:10 +00:00
|
|
|
version = "1.16.2";
|
2020-03-17 01:30:05 +00:00
|
|
|
|
2018-06-23 13:27:58 +00:00
|
|
|
format = "other";
|
2014-02-02 15:07:03 +00:00
|
|
|
|
2018-09-05 12:12:02 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2014-02-02 15:07:03 +00:00
|
|
|
src = fetchurl {
|
2020-03-17 01:30:05 +00:00
|
|
|
url = "${meta.homepage}/src/gst-python/${pname}-${version}.tar.xz";
|
2020-06-02 20:44:52 +00:00
|
|
|
sha256 = "1a48ca66izmm8hnp608jv5isg3jxb0vlfmhns0bg9nbkilag7390";
|
2014-02-02 15:07:03 +00:00
|
|
|
};
|
|
|
|
|
2020-03-17 01:30:05 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkgconfig
|
|
|
|
python
|
|
|
|
gobject-introspection
|
|
|
|
gst-plugins-base
|
|
|
|
];
|
2015-09-18 12:24:19 +00:00
|
|
|
|
2020-03-17 01:30:05 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
gst-plugins-base
|
|
|
|
pygobject3
|
|
|
|
];
|
2014-02-02 15:07:03 +00:00
|
|
|
|
2020-04-10 09:20:00 +00:00
|
|
|
patches = stdenv.lib.optionals stdenv.isDarwin [
|
|
|
|
# Fix configure python lib detection in macOS. Remove with the next release
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/GStreamer/gst-python/commit/f98c206bdf01529f8ea395a719b10baf2bdf717f.patch";
|
|
|
|
sha256 = "04n4zrnfivgr7iaqw4sjlbd882s8halc2bbbhfxqf0sg2lqwmrxg";
|
|
|
|
})
|
2020-06-09 13:02:16 +00:00
|
|
|
] ++ [
|
|
|
|
# Fix linking against Python 3.8
|
|
|
|
# https://gitlab.freedesktop.org/gstreamer/gst-python/merge_requests/30
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.freedesktop.org/gstreamer/gst-python/commit/22f28155d86e27c4134de4ed2861264003fcfd23.patch";
|
|
|
|
sha256 = "Y70qVguHUBmmRVMFBKAP0d6anBQw5W0TKyu2bAwxbQg=";
|
|
|
|
})
|
2020-04-10 09:20:00 +00:00
|
|
|
];
|
|
|
|
|
2018-04-03 07:36:38 +00:00
|
|
|
mesonFlags = [
|
2018-09-05 12:12:02 +00:00
|
|
|
"-Dpython=python${if isPy3k then "3" else "2"}"
|
|
|
|
"-Dpygi-overrides-dir=${placeholder "out"}/${python.sitePackages}/gi/overrides"
|
2017-09-08 19:03:20 +00:00
|
|
|
];
|
2014-02-02 15:07:03 +00:00
|
|
|
|
2018-09-05 12:12:02 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
# TODO: Meson setup hook does not like buildPythonPackage
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/47390
|
|
|
|
installCheckPhase = "meson test --print-errorlogs";
|
2018-04-03 07:36:38 +00:00
|
|
|
|
2014-02-02 15:07:03 +00:00
|
|
|
meta = {
|
2020-03-17 01:30:05 +00:00
|
|
|
homepage = "https://gstreamer.freedesktop.org";
|
2014-02-02 15:07:03 +00:00
|
|
|
|
|
|
|
description = "Python bindings for GStreamer";
|
|
|
|
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.lgpl2Plus;
|
2014-02-02 15:07:03 +00:00
|
|
|
};
|
|
|
|
}
|