[PATCH staging 0/6] Add Pitivi

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Prikler
  • Leo Famulari
Owner
unassigned
Submitted by
Leo Prikler
Severity
normal
L
L
Leo Prikler wrote on 22 Nov 2020 21:34
(address . guix-patches@gnu.org)
b95e8471587cf071bcc5c2ad864dc34aaadea00f.camel@student.tugraz.at
Hello Guix,

the following patch series adds the video editor Pitivi [1]. As it
depends on GStreamer >= 1.17.90 (i.e. de facto 1.18), it has to be
applied to the staging branch. There are also some minor changes to
the packages around it, e.g. the now deprecated gst-transcoder and a
minor fix to ffmpeg-4.2 (for those who want to build pitivi without
waiting hours on Rust).

Regards, Leo.

L
L
Leo Prikler wrote on 22 Nov 2020 21:36
[PATCH staging 1/6] gnu: libpeas: Update to 1.28.0.
(address . 44806@debbugs.gnu.org)
20201122203625.1347-1-leo.prikler@student.tugraz.at
* gnu/packages/gnome.scm (libpeas): Update to 1.28.0.
---
gnu/packages/gnome.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index e22384a625..c3d912c1d0 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2982,7 +2982,7 @@ some form of information without getting in the user's way.")
(define-public libpeas
(package
(name "libpeas")
- (version "1.24.1")
+ (version "1.28.0")
(source
(origin
(method url-fetch)
@@ -2991,7 +2991,7 @@ some form of information without getting in the user's way.")
name "-" version ".tar.xz"))
(sha256
(base32
- "1162dr7smmfb02czmhshr0f93hqj7w0nw29bys5lzfvwarxcyflw"))))
+ "05cb7drn6arc4gi02wgsvzibigi2riz5gnfnmlb0zmbfnj9ikna2"))))
(build-system meson-build-system)
(arguments
'(#:phases
--
2.29.2
L
L
Leo Prikler wrote on 22 Nov 2020 21:36
[PATCH staging 2/6] gnu: gst-editing-services: Build with introspection.
(address . 44806@debbugs.gnu.org)
20201122203625.1347-2-leo.prikler@student.tugraz.at
* gnu/packages/gstreamer.scm (gstreamer-editing-services)[native-inputs]:
Add gobject-introspection and glib:bin.
---
gnu/packages/gstreamer.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 85c48a6877..d0bc422a98 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -889,6 +889,8 @@ decoders, muxers, and demuxers provided by FFmpeg.")
("libxml2" ,libxml2)))
(native-inputs
`(("flex" ,flex)
+ ("gobject-introspection" ,gobject-introspection)
+ ("glib:bin" ,glib "bin")
("gst-plugins-bad" ,gst-plugins-bad)
("gst-plugins-good" ,gst-plugins-good)
("perl" ,perl)
--
2.29.2
L
L
Leo Prikler wrote on 22 Nov 2020 21:36
[PATCH staging 3/6] gnu: Add gst-plugins/selection.
(address . 44806@debbugs.gnu.org)
20201122203625.1347-3-leo.prikler@student.tugraz.at
* gnu/packages/gstreamer.scm (gst-plugins/selection): New variable.
---
gnu/packages/gstreamer.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index d0bc422a98..4756508f2e 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -903,6 +903,28 @@ decoders, muxers, and demuxers provided by FFmpeg.")
non-linear editors.")
(license license:gpl2+)))
+(define-public gst-plugins/selection
+ (lambda* (pkg #:key plugins configure-flags))
+ "Build PKG with only PLUGINS enabled. Optionally, if CONFIGURE-FLAGS are
+given, also pass them to the build system instead of the ones used by PKG."
+ (package/inherit pkg
+ (arguments
+ (substitute-keyword-arguments (package-arguments pkg)
+ ((#:configure-flags flags `(list ,@(or configure-flags '()))
+ `(append
+ (list
+ ,@(map (lambda (plugin)
+ (string-append "-D" plugin "=enabled"))
+ plugins))
+ ,(or configure-flags flags)))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'disable-auto-plugins
+ (lambda _
+ (substitute* "meson_options.txt"
+ (("'auto'") "'disabled'"))
+ #t)))))))))
+
(define-public python-gst
(package
(name "python-gst")
--
2.29.2
L
L
Leo Prikler wrote on 22 Nov 2020 21:36
[PATCH staging 4/6] gnu: Update and deprecate gst-transcoder.
(address . 44806@debbugs.gnu.org)
20201122203625.1347-4-leo.prikler@student.tugraz.at
As of 1.18, gst-transcoder is part of gst-plugins-bad.

* gnu/packages/video.scm (gst-transcoder): Move from here...
* gnu/packages/gstreamer.scm (gst-transcoder): ... to here.
Redefine in terms of gst-plugins-bad and deprecate in favor of it.
---
gnu/packages/gstreamer.scm | 7 +++++++
gnu/packages/video.scm | 28 ----------------------------
2 files changed, 7 insertions(+), 28 deletions(-)

Toggle diff (59 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 4756508f2e..f584576f2a 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -925,6 +925,13 @@ given, also pass them to the build system instead of the ones used by PKG."
(("'auto'") "'disabled'"))
#t)))))))))
+(define-public gst-transcoder
+ (deprecated-package
+ "gst-transcoder"
+ (gst-plugins/selection gst-plugins-bad
+ #:plugins '("transcoder")
+ #:configure-flags '("-Dintrospection=enabled"))))
+
(define-public python-gst
(package
(name "python-gst")
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 21380a9677..0278604fb2 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3962,34 +3962,6 @@ tools for styling them, including a built-in real-time video preview.")
; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
-(define-public gst-transcoder
- (package
- (name "gst-transcoder")
- (version "1.12.2")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/pitivi/gst-transcoder")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
- (build-system meson-build-system)
- (inputs
- `(("gobject-introspection" ,gobject-introspection)
- ("glib" ,glib)
- ("gstreamer" ,gstreamer)
- ("gst-plugins-base" ,gst-plugins-base)))
- (native-inputs
- `(("python" ,python)
- ("pkg-config" ,pkg-config)))
- (home-page "https://github.com/pitivi/gst-transcoder/")
- (synopsis "GStreamer Transcoding API")
- (description "GStreamer Transcoding API")
- (license license:lgpl2.1)))
-
(define-public gavl
(package
(name "gavl")
--
2.29.2
L
L
Leo Prikler wrote on 22 Nov 2020 21:36
[PATCH staging 5/6] gnu: Add pitivi.
(address . 44806@debbugs.gnu.org)
20201122203625.1347-5-leo.prikler@student.tugraz.at
* gnu/packages/video.scm (pitivi): New variable.
---
gnu/packages/video.scm | 67 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (80 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 0278604fb2..3357b4c03a 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3962,6 +3962,73 @@ tools for styling them, including a built-in real-time video preview.")
; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
+(define-public pitivi
+ ;; Pitivi switched to a non-semantic versioning scheme close before 1.0
+ (let ((latest-semver "0.999.0")
+ (%version "2020.09.2"))
+ (package
+ (name "pitivi")
+ (version (string-append latest-semver "-" %version))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor %version) "/"
+ name "-" %version ".tar.xz"))
+ (sha256
+ (base32
+ "0hzvv4wia4rk0kvq16y27imq2qd4q5lg3vx99hdcjdb1x3zqqfg0"))))
+ (build-system meson-build-system)
+ (inputs
+ `(("glib" ,glib)
+ ("gst-editing-services" ,gst-editing-services)
+ ("gstreamer" ,gstreamer)
+ ("gst-plugins-base" ,gst-plugins-base)
+ ("gst-plugins-good" ,gst-plugins-good)
+ ("gst-plugins-bad"
+ ,(gst-plugins/selection gst-plugins-bad
+ #:plugins '("debugutils" "transcoder")
+ #:configure-flags '("-Dintrospection=enabled")))
+ ("gst-libav" ,gst-libav)
+ ("gsound" ,gsound)
+ ("gtk+" ,gtk+)
+ ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+ ("libpeas" ,libpeas)
+ ("libnotify" ,libnotify)
+ ("pango" ,pango)
+ ("python-gst" ,python-gst)
+ ("python-numpy" ,python-numpy)
+ ("python-matplotlib" ,python-matplotlib)
+ ("python-pycairo" ,python-pycairo)
+ ("python-pygobject" ,python-pygobject)))
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("glib:bin" ,glib "bin")
+ ("itstool" ,itstool)
+ ("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:glib-or-gtk? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((prog (string-append (assoc-ref outputs "out")
+ "/bin/pitivi")))
+ (wrap-program prog
+ `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
+ ;; We've only added inputs for what Pitivi deems either
+ ;; necessary or optional. Let the user's packages take
+ ;; precedence in case they have e.g. the full gst-plugins-bad.
+ `("GST_PLUGIN_SYSTEM_PATH" suffix
+ (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))
+ #t)))))
+ (home-page "http://www.pitivi.org")
+ (synopsis "Video editor based on GStreamer Editing Services")
+ (description "Pitivi is a video editor built upon the GStreamer Editing
+Services. It aims to be an intuitive and flexible application that can appeal
+to newbies and professionals alike.")
+ (license license:lgpl2.1+))))
+
(define-public gavl
(package
(name "gavl")
--
2.29.2
L
L
Leo Prikler wrote on 22 Nov 2020 21:36
[PATCH staging 6/6] gnu: ffmpeg-4.2: Remove rav1e from inputs.
(address . 44806@debbugs.gnu.org)
20201122203625.1347-6-leo.prikler@student.tugraz.at
* gnu/packages/video.scm (ffmpeg-4.2)[inputs]: Remove rav1e.
---
gnu/packages/video.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 3357b4c03a..48b7c623e7 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1623,7 +1623,10 @@ audio/video codec library.")
(arguments
(substitute-keyword-arguments (package-arguments ffmpeg)
((#:configure-flags flags)
- `(delete "--enable-librav1e" ,flags))))))
+ `(delete "--enable-librav1e" ,flags))))
+ (inputs (fold alist-delete
+ (package-inputs ffmpeg)
+ '("rav1e")))))
(define-public ffmpeg-3.4
(package
--
2.29.2
L
L
Leo Famulari wrote on 15 Dec 2020 08:16
Re: [bug#44806] [PATCH staging 0/6] Add Pitivi
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X9hi6phEXJysaK9o@jasmine.lan
On Sun, Nov 22, 2020 at 09:34:23PM +0100, Leo Prikler wrote:
Toggle quote (9 lines)
> Hello Guix,
>
> the following patch series adds the video editor Pitivi [1]. As it
> depends on GStreamer >= 1.17.90 (i.e. de facto 1.18), it has to be
> applied to the staging branch. There are also some minor changes to
> the packages around it, e.g. the now deprecated gst-transcoder and a
> minor fix to ffmpeg-4.2 (for those who want to build pitivi without
> waiting hours on Rust).

Thanks! It will be great to have this in Guix.
L
L
Leo Famulari wrote on 15 Dec 2020 08:17
Re: [bug#44806] [PATCH staging 2/6] gnu: gst-editing-services: Build with introspection.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X9hjFLl5b6XbNkkH@jasmine.lan
On Sun, Nov 22, 2020 at 09:36:21PM +0100, Leo Prikler wrote:
Toggle quote (3 lines)
> * gnu/packages/gstreamer.scm (gstreamer-editing-services)[native-inputs]:
> Add gobject-introspection and glib:bin.

Can you add a brief comment to the commit message explaining why we do
this?
L
L
Leo Famulari wrote on 15 Dec 2020 08:19
Re: [bug#44806] [PATCH staging 3/6] gnu: Add gst-plugins/selection.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X9hjki/B+UiWE7gl@jasmine.lan
On Sun, Nov 22, 2020 at 09:36:22PM +0100, Leo Prikler wrote:
Toggle quote (2 lines)
> * gnu/packages/gstreamer.scm (gst-plugins/selection): New variable.

With the patch series applied on the current staging branch
(56e2da5ae851c), compilation of Guix fails like this:

------
$ guix environment --pure guix -- make -j4
[...]
gnu/packages/gstreamer.scm:907:0: error: (define-public gst-plugins/selection (lambda* (pkg #:key plugins configure-flags)) "Build PKG with only PLUGINS enabled. Optionally, if CONFIGURE-FLAGS are\ngiven, also pass them to the build system instead of the ones used by PKG." (package/inherit pkg (arguments (substitute-keyword-arguments (package-arguments pkg) ((#:configure-flags flags (quasiquote (list (unquote-splicing (or configure-flags (quote ()))))) (quasiquote (append (list (unquote-splicing (map (lambda (plugin) (string-append "-D" plugin "=enabled")) plugins))) (unquote (or configure-flags flags))))) ((#:phases phases) (quasiquote (modify-phases (unquote phases) (add-after (quote unpack) (quote disable-auto-plugins) (lambda _ (substitute* "meson_options.txt" (("'auto'") "'disabled'")) #t)))))))))): source expression failed to match any pattern
make[2]: *** [Makefile:6247: make-go] Error 1
------

Can you reproduce it?
L
L
Leo Famulari wrote on 15 Dec 2020 08:21
Re: [bug#44806] [PATCH staging 4/6] gnu: Update and deprecate gst-transcoder.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X9hkCPzbDq01s3zG@jasmine.lan
On Sun, Nov 22, 2020 at 09:36:23PM +0100, Leo Prikler wrote:
Toggle quote (6 lines)
> As of 1.18, gst-transcoder is part of gst-plugins-bad.
>
> * gnu/packages/video.scm (gst-transcoder): Move from here...
> * gnu/packages/gstreamer.scm (gst-transcoder): ... to here.
> Redefine in terms of gst-plugins-bad and deprecate in favor of it.

This is good but I think we can just remove gst-transcoder, right? I
don't see any packages using it in Guix.
L
L
Leo Famulari wrote on 15 Dec 2020 08:25
Re: [bug#44806] [PATCH staging 5/6] gnu: Add pitivi.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X9hk346ZFj2Sk8oX@jasmine.lan
On Sun, Nov 22, 2020 at 09:36:24PM +0100, Leo Prikler wrote:
Toggle quote (2 lines)
> * gnu/packages/video.scm (pitivi): New variable.

Overall LGTM.

Toggle quote (11 lines)
> + ("gst-plugins-bad"
> + ,(gst-plugins/selection gst-plugins-bad
> + #:plugins '("debugutils" "transcoder")
> + #:configure-flags '("-Dintrospection=enabled")))

> + ;; We've only added inputs for what Pitivi deems either
> + ;; necessary or optional. Let the user's packages take
> + ;; precedence in case they have e.g. the full gst-plugins-bad.
> + `("GST_PLUGIN_SYSTEM_PATH" suffix
> + (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))

Do we do this to save space? Or to avoid the rest of the bad plugins?
L
L
Leo Prikler wrote on 15 Dec 2020 08:55
(name . Leo Famulari)(address . leo@famulari.name)(address . 44806@debbugs.gnu.org)
5ec8e559cc35936d03bfbc88593a36d09a61649c.camel@student.tugraz.at
Am Dienstag, den 15.12.2020, 02:25 -0500 schrieb Leo Famulari:
Toggle quote (21 lines)
> On Sun, Nov 22, 2020 at 09:36:24PM +0100, Leo Prikler wrote:
> > * gnu/packages/video.scm (pitivi): New variable.
>
> Overall LGTM.
>
> > + ("gst-plugins-bad"
> > + ,(gst-plugins/selection gst-plugins-bad
> > + #:plugins '("debugutils"
> > "transcoder")
> > + #:configure-flags '("-
> > Dintrospection=enabled")))
> > + ;; We've only added inputs for what Pitivi deems
> > either
> > + ;; necessary or optional. Let the user's
> > packages take
> > + ;; precedence in case they have e.g. the full
> > gst-plugins-bad.
> > + `("GST_PLUGIN_SYSTEM_PATH" suffix
> > + (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))
>
> Do we do this to save space? Or to avoid the rest of the bad plugins?
Both would be valid reasons to do this imo. Adding more bad plugins is
likely also not going to increase the number of features Pitivi offers.
L
L
Leo Famulari wrote on 15 Dec 2020 09:04
Re: [bug#44806] [PATCH staging 6/6] gnu: ffmpeg-4.2: Remove rav1e from inputs.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X9huDMg5P4cC/9yK@jasmine.lan
On Sun, Nov 22, 2020 at 09:36:25PM +0100, Leo Prikler wrote:
Toggle quote (2 lines)
> * gnu/packages/video.scm (ffmpeg-4.2)[inputs]: Remove rav1e.

Thanks, I pushed this patch as commit
54d832680652faa23711ec326462f9a62645080d, along with a similar commit
for FFmpeg 2.8.

Nothing is using this package at the moment... it should be removed
eventually.
L
L
Leo Prikler wrote on 15 Dec 2020 09:45
Re: [bug#44806] [PATCH staging 4/6] gnu: Update and deprecate gst-transcoder.
(name . Leo Famulari)(address . leo@famulari.name)(address . 44806@debbugs.gnu.org)
4cb39759cb23de06a738715f5e8c4baf8e2b92a1.camel@student.tugraz.at
Am Dienstag, den 15.12.2020, 02:21 -0500 schrieb Leo Famulari:
Toggle quote (9 lines)
> On Sun, Nov 22, 2020 at 09:36:23PM +0100, Leo Prikler wrote:
> > As of 1.18, gst-transcoder is part of gst-plugins-bad.
> >
> > * gnu/packages/video.scm (gst-transcoder): Move from here...
> > * gnu/packages/gstreamer.scm (gst-transcoder): ... to here.
> > Redefine in terms of gst-plugins-bad and deprecate in favor of it.
>
> This is good but I think we can just remove gst-transcoder, right? I
> don't see any packages using it in Guix.
That may be the case, but I've opted to inform users about its
deprecation first. It was probably packaged in an earlier effort to
add pitivi, but who knows whether someone might be having it in their
profile for some personal project?
L
L
Leo Prikler wrote on 15 Dec 2020 10:03
[PATCH v2 2/5] gnu: gst-editing-services: Build with introspection.
(address . 44806@debbugs.gnu.org)(address . leo@famulari.name)
20201215090306.28109-2-leo.prikler@student.tugraz.at
Some packages, such as Pitivi, might want to interact with GES through
GObject Introspection, so let's enable that.

* gnu/packages/gstreamer.scm (gstreamer-editing-services)[native-inputs]:
Add gobject-introspection and glib:bin.
---
gnu/packages/gstreamer.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 256f298346..f8c5159a3b 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -898,6 +898,8 @@ decoders, muxers, and demuxers provided by FFmpeg.")
("libxml2" ,libxml2)))
(native-inputs
`(("flex" ,flex)
+ ("gobject-introspection" ,gobject-introspection)
+ ("glib:bin" ,glib "bin")
("gst-plugins-bad" ,gst-plugins-bad)
("gst-plugins-good" ,gst-plugins-good)
("perl" ,perl)
--
2.29.2
L
L
Leo Prikler wrote on 15 Dec 2020 10:03
[PATCH v2 1/5] gnu: libpeas: Update to 1.28.0.
(address . 44806@debbugs.gnu.org)(address . leo@famulari.name)
20201215090306.28109-1-leo.prikler@student.tugraz.at
* gnu/packages/gnome.scm (libpeas): Update to 1.28.0.
---
gnu/packages/gnome.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 64fded105a..11a0cbcdbc 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2982,7 +2982,7 @@ some form of information without getting in the user's way.")
(define-public libpeas
(package
(name "libpeas")
- (version "1.24.1")
+ (version "1.28.0")
(source
(origin
(method url-fetch)
@@ -2991,7 +2991,7 @@ some form of information without getting in the user's way.")
name "-" version ".tar.xz"))
(sha256
(base32
- "1162dr7smmfb02czmhshr0f93hqj7w0nw29bys5lzfvwarxcyflw"))))
+ "05cb7drn6arc4gi02wgsvzibigi2riz5gnfnmlb0zmbfnj9ikna2"))))
(build-system meson-build-system)
(arguments
'(#:phases
--
2.29.2
L
L
Leo Prikler wrote on 15 Dec 2020 10:03
[PATCH v2 3/5] gnu: Add gst-plugins/selection.
(address . 44806@debbugs.gnu.org)(address . leo@famulari.name)
20201215090306.28109-3-leo.prikler@student.tugraz.at
* gnu/packages/gstreamer.scm (gst-plugins/selection): New variable.
---
gnu/packages/gstreamer.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index f8c5159a3b..3b572b9f07 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -912,6 +912,28 @@ decoders, muxers, and demuxers provided by FFmpeg.")
non-linear editors.")
(license license:gpl2+)))
+(define-public gst-plugins/selection
+ (lambda* (pkg #:key plugins configure-flags)
+ "Build PKG with only PLUGINS enabled. Optionally, if CONFIGURE-FLAGS are
+given, also pass them to the build system instead of the ones used by PKG."
+ (package/inherit pkg
+ (arguments
+ (substitute-keyword-arguments (package-arguments pkg)
+ ((#:configure-flags flags `(,@(or configure-flags '())))
+ `(append
+ (list
+ ,@(map (lambda (plugin)
+ (string-append "-D" plugin "=enabled"))
+ plugins))
+ (list ,@(or configure-flags flags))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'disable-auto-plugins
+ (lambda _
+ (substitute* "meson_options.txt"
+ (("'auto'") "'disabled'"))
+ #t)))))))))
+
(define-public python-gst
(package
(name "python-gst")
--
2.29.2
L
L
Leo Prikler wrote on 15 Dec 2020 10:03
[PATCH v2 4/5] gnu: Update and deprecate gst-transcoder.
(address . 44806@debbugs.gnu.org)(address . leo@famulari.name)
20201215090306.28109-4-leo.prikler@student.tugraz.at
As of 1.18, gst-transcoder is part of gst-plugins-bad.

* gnu/packages/video.scm (gst-transcoder): Move from here...
* gnu/packages/gstreamer.scm (gst-transcoder): ... to here.
Redefine in terms of gst-plugins-bad and deprecate in favor of it.
---
gnu/packages/gstreamer.scm | 7 +++++++
gnu/packages/video.scm | 28 ----------------------------
2 files changed, 7 insertions(+), 28 deletions(-)

Toggle diff (59 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 3b572b9f07..944eba03d9 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -934,6 +934,13 @@ given, also pass them to the build system instead of the ones used by PKG."
(("'auto'") "'disabled'"))
#t)))))))))
+(define-public gst-transcoder
+ (deprecated-package
+ "gst-transcoder"
+ (gst-plugins/selection gst-plugins-bad
+ #:plugins '("transcoder")
+ #:configure-flags '("-Dintrospection=enabled"))))
+
(define-public python-gst
(package
(name "python-gst")
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index f4c7174c03..56ecb93fbe 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3974,34 +3974,6 @@ tools for styling them, including a built-in real-time video preview.")
; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
-(define-public gst-transcoder
- (package
- (name "gst-transcoder")
- (version "1.12.2")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/pitivi/gst-transcoder")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
- (build-system meson-build-system)
- (inputs
- `(("gobject-introspection" ,gobject-introspection)
- ("glib" ,glib)
- ("gstreamer" ,gstreamer)
- ("gst-plugins-base" ,gst-plugins-base)))
- (native-inputs
- `(("python" ,python)
- ("pkg-config" ,pkg-config)))
- (home-page "https://github.com/pitivi/gst-transcoder/")
- (synopsis "GStreamer Transcoding API")
- (description "GStreamer Transcoding API")
- (license license:lgpl2.1)))
-
(define-public gavl
(package
(name "gavl")
--
2.29.2
L
L
Leo Prikler wrote on 15 Dec 2020 10:03
[PATCH v2 5/5] gnu: Add pitivi.
(address . 44806@debbugs.gnu.org)(address . leo@famulari.name)
20201215090306.28109-5-leo.prikler@student.tugraz.at
* gnu/packages/video.scm (pitivi): New variable.
---
gnu/packages/video.scm | 67 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (80 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 56ecb93fbe..14bbc1c7c1 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3974,6 +3974,73 @@ tools for styling them, including a built-in real-time video preview.")
; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
+(define-public pitivi
+ ;; Pitivi switched to a non-semantic versioning scheme close before 1.0
+ (let ((latest-semver "0.999.0")
+ (%version "2020.09.2"))
+ (package
+ (name "pitivi")
+ (version (string-append latest-semver "-" %version))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor %version) "/"
+ name "-" %version ".tar.xz"))
+ (sha256
+ (base32
+ "0hzvv4wia4rk0kvq16y27imq2qd4q5lg3vx99hdcjdb1x3zqqfg0"))))
+ (build-system meson-build-system)
+ (inputs
+ `(("glib" ,glib)
+ ("gst-editing-services" ,gst-editing-services)
+ ("gstreamer" ,gstreamer)
+ ("gst-plugins-base" ,gst-plugins-base)
+ ("gst-plugins-good" ,gst-plugins-good)
+ ("gst-plugins-bad"
+ ,(gst-plugins/selection gst-plugins-bad
+ #:plugins '("debugutils" "transcoder")
+ #:configure-flags '("-Dintrospection=enabled")))
+ ("gst-libav" ,gst-libav)
+ ("gsound" ,gsound)
+ ("gtk+" ,gtk+)
+ ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+ ("libpeas" ,libpeas)
+ ("libnotify" ,libnotify)
+ ("pango" ,pango)
+ ("python-gst" ,python-gst)
+ ("python-numpy" ,python-numpy)
+ ("python-matplotlib" ,python-matplotlib)
+ ("python-pycairo" ,python-pycairo)
+ ("python-pygobject" ,python-pygobject)))
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("glib:bin" ,glib "bin")
+ ("itstool" ,itstool)
+ ("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:glib-or-gtk? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((prog (string-append (assoc-ref outputs "out")
+ "/bin/pitivi")))
+ (wrap-program prog
+ `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
+ ;; We've only added inputs for what Pitivi deems either
+ ;; necessary or optional. Let the user's packages take
+ ;; precedence in case they have e.g. the full gst-plugins-bad.
+ `("GST_PLUGIN_SYSTEM_PATH" suffix
+ (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))
+ #t)))))
+ (home-page "http://www.pitivi.org")
+ (synopsis "Video editor based on GStreamer Editing Services")
+ (description "Pitivi is a video editor built upon the GStreamer Editing
+Services. It aims to be an intuitive and flexible application that can appeal
+to newbies and professionals alike.")
+ (license license:lgpl2.1+))))
+
(define-public gavl
(package
(name "gavl")
--
2.29.2
L
L
Leo Prikler wrote on 15 Dec 2020 10:05
Re: [bug#44806] [PATCH staging 0/6] Add Pitivi
(name . Leo Famulari)(address . leo@famulari.name)(address . 44806@debbugs.gnu.org)
438d8c16340fa52d5193a2a2c7ae184ff09b3705.camel@student.tugraz.at
Am Dienstag, den 15.12.2020, 02:16 -0500 schrieb Leo Famulari:
Toggle quote (13 lines)
> On Sun, Nov 22, 2020 at 09:34:23PM +0100, Leo Prikler wrote:
> > Hello Guix,
> >
> > the following patch series adds the video editor Pitivi [1]. As it
> > depends on GStreamer >= 1.17.90 (i.e. de facto 1.18), it has to be
> > applied to the staging branch. There are also some minor changes
> > to
> > the packages around it, e.g. the now deprecated gst-transcoder and
> > a
> > minor fix to ffmpeg-4.2 (for those who want to build pitivi without
> > waiting hours on Rust).
>
> Thanks! It will be great to have this in Guix.
I've rerolled the patches, taking your input into account. Since
master has GStreamer 1.18.1 now, it is no longer a patch for staging,
but should be able to be applied on master directly.

Regards,
Leo
L
L
Leo Famulari wrote on 15 Dec 2020 22:20
Re: [PATCH v2 5/5] gnu: Add pitivi.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X9konXWg5cVvUi4B@jasmine.lan
On Tue, Dec 15, 2020 at 10:03:06AM +0100, Leo Prikler wrote:
Toggle quote (2 lines)
> * gnu/packages/video.scm (pitivi): New variable.

Thanks! The updated patches work for me and the Pitivi editor seems nice
— hopefully it's a useful balance of simplicity and utility.

I invite you to apply for commit access, following the steps in the
manual section Commit Access. I will be one of the three references for
you.


What do you think?
L
L
Leo Famulari wrote on 15 Dec 2020 22:21
Re: [bug#44806] [PATCH staging 4/6] gnu: Update and deprecate gst-transcoder.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X9koyPBp36ie3lqr@jasmine.lan
On Tue, Dec 15, 2020 at 09:45:44AM +0100, Leo Prikler wrote:
Toggle quote (14 lines)
> Am Dienstag, den 15.12.2020, 02:21 -0500 schrieb Leo Famulari:
> > On Sun, Nov 22, 2020 at 09:36:23PM +0100, Leo Prikler wrote:
> > > As of 1.18, gst-transcoder is part of gst-plugins-bad.
> > >
> > > * gnu/packages/video.scm (gst-transcoder): Move from here...
> > > * gnu/packages/gstreamer.scm (gst-transcoder): ... to here.
> > > Redefine in terms of gst-plugins-bad and deprecate in favor of it.
> >
> > This is good but I think we can just remove gst-transcoder, right? I
> > don't see any packages using it in Guix.
> That may be the case, but I've opted to inform users about its
> deprecation first. It was probably packaged in an earlier effort to
> add pitivi, but who knows whether someone might be having it in their
> profile for some personal project?
Okay, that makes sense. We should remember to complete the process and
remove the package eventually :)
L
L
Leo Famulari wrote on 15 Dec 2020 22:31
Re: [bug#44806] [PATCH staging 5/6] gnu: Add pitivi.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X9krQA8RDMmOZaNg@jasmine.lan
On Tue, Dec 15, 2020 at 08:55:17AM +0100, Leo Prikler wrote:
Toggle quote (5 lines)
> Am Dienstag, den 15.12.2020, 02:25 -0500 schrieb Leo Famulari:
> > Do we do this to save space? Or to avoid the rest of the bad plugins?
> Both would be valid reasons to do this imo. Adding more bad plugins is
> likely also not going to increase the number of features Pitivi offers.

This is a good idea for the "bad" plugins, because they are rarely used
in Guix, so there is less chance of unecessary duplication compared to
the other collections of GStreamer plugins.

Still, it increases complexity, and it sholud be "worth it" in some
sense. If gst-plugins/selection becomes popular, it may be that the
increase in package objects outweighs the disk space savings — the
package graph may grow so large that it slows Guix package operations
down too much. The disk space savings may be obviated in that case,
anyways.

If you choose to apply for commit access, as I suggested, you will be
able to use your judgement here :)
L
L
Leo Prikler wrote on 16 Dec 2020 01:18
(name . Leo Famulari)(address . leo@famulari.name)(address . 44806@debbugs.gnu.org)
eafc96dd0cc3a7c91b3b537b92806049585492c5.camel@student.tugraz.at
Am Dienstag, den 15.12.2020, 16:31 -0500 schrieb Leo Famulari:
Toggle quote (14 lines)
> On Tue, Dec 15, 2020 at 08:55:17AM +0100, Leo Prikler wrote:
> > Am Dienstag, den 15.12.2020, 02:25 -0500 schrieb Leo Famulari:
> > > Do we do this to save space? Or to avoid the rest of the bad
> > > plugins?
> > Both would be valid reasons to do this imo. Adding more bad
> > plugins is
> > likely also not going to increase the number of features Pitivi
> > offers.
>
> This is a good idea for the "bad" plugins, because they are rarely
> used
> in Guix, so there is less chance of unecessary duplication compared
> to
> the other collections of GStreamer plugins.
There is sadly still a lot of duplication between a plugin "selection"
and its base package, so the option will have to be used sparingly.
The reason why I opted for writing a procedure, that redoes the whole
build rather than just copying some shared libraries, is because I
don't think the latter would be particularly safe to do. Perhaps I'm
wrong on that, however.

Toggle quote (6 lines)
> Still, it increases complexity, and it sholud be "worth it" in some
> sense. If gst-plugins/selection becomes popular, it may be that the
> increase in package objects outweighs the disk space savings — the
> package graph may grow so large that it slows Guix package operations
> down too much. The disk space savings may be obviated in that case,
> anyways.
I think it's only "worth it" when importing not more than two or three
plugins from "bad" or "ugly". Even then the savings are only moderate,
as gstreamer will still build what it deems to be absolutely necessary.

To be completely honest, I also don't expect this to be around for too
long. I am more than happy to see this procedure vanish at some point
when we have parameters, though maybe that'd be a very Gentoo-y way of
using parameters and still suffer from the same problem.

Toggle quote (2 lines)
> If you choose to apply for commit access, as I suggested, you will be
> able to use your judgement here :)
Sounds like it slowly gets time to take this serious and apply for
commit access, then. I'll try to get that done soon-ish™.

Regards,
Leo
L
L
Leo Prikler wrote on 29 Dec 2020 19:28
(name . Leo Famulari)(address . leo@famulari.name)(address . 44806@debbugs.gnu.org)
7a4f17b407fc98b405ae94bf01338be4cde51506.camel@student.tugraz.at
Hello,

Am Mittwoch, den 16.12.2020, 01:18 +0100 schrieb Leo Prikler:
Toggle quote (9 lines)
> Am Dienstag, den 15.12.2020, 16:31 -0500 schrieb Leo Famulari:
> > If you choose to apply for commit access, as I suggested, you will
> > be
> > able to use your judgement here :)
> Sounds like it slowly gets time to take this serious and apply for
> commit access, then. I'll try to get that done soon-ish™.
>
> Regards,
> Leo
Now that I do have commit access, is there anything still blocking
this? I don't want to push a controversial change too quickly ?.

Regards,
Leo
L
L
Leo Famulari wrote on 29 Dec 2020 20:04
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 44806@debbugs.gnu.org)
X+t9ru0bamJVtaS5@jasmine.lan
On Tue, Dec 29, 2020 at 07:28:40PM +0100, Leo Prikler wrote:
Toggle quote (15 lines)
> Hello,
>
> Am Mittwoch, den 16.12.2020, 01:18 +0100 schrieb Leo Prikler:
> > Am Dienstag, den 15.12.2020, 16:31 -0500 schrieb Leo Famulari:
> > > If you choose to apply for commit access, as I suggested, you will
> > > be
> > > able to use your judgement here :)
> > Sounds like it slowly gets time to take this serious and apply for
> > commit access, then. I'll try to get that done soon-ish™.
> >
> > Regards,
> > Leo
> Now that I do have commit access, is there anything still blocking
> this? I don't want to push a controversial change too quickly ?.

Go for it!

My take on the conversation is that it's worth it for gst-plugins-bad,
which is rarely used.

I'm looking forward to `guix install pitivi`
L
L
Leo Prikler wrote on 29 Dec 2020 20:27
(name . Leo Famulari)(address . leo@famulari.name)(address . 44806-done@debbugs.gnu.org)
fdb166942eac9d388b8fcbd63eabe576c1ed4705.camel@student.tugraz.at
Am Dienstag, den 29.12.2020, 14:04 -0500 schrieb Leo Famulari:
Toggle quote (25 lines)
> On Tue, Dec 29, 2020 at 07:28:40PM +0100, Leo Prikler wrote:
> > Hello,
> >
> > Am Mittwoch, den 16.12.2020, 01:18 +0100 schrieb Leo Prikler:
> > > Am Dienstag, den 15.12.2020, 16:31 -0500 schrieb Leo Famulari:
> > > > If you choose to apply for commit access, as I suggested, you
> > > > will
> > > > be
> > > > able to use your judgement here :)
> > > Sounds like it slowly gets time to take this serious and apply
> > > for
> > > commit access, then. I'll try to get that done soon-ish™.
> > >
> > > Regards,
> > > Leo
> > Now that I do have commit access, is there anything still blocking
> > this? I don't want to push a controversial change too quickly ?.
>
> Go for it!
>
> My take on the conversation is that it's worth it for gst-plugins-
> bad,
> which is rarely used.
>
> I'm looking forward to `guix install pitivi`
Now pushed as c412900d3e8c59ad59c994fd65634f9aafae1800.
Closed
?