diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2026-03-16 09:38:00 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2026-03-28 16:00:45 +0900 |
| commit | fe237dca8ac10f46574986acb4317317f13a8bfb (patch) | |
| tree | cb5cd8a5cedd5f74e4005e187353551abae61b0e /gnu/packages/gstreamer.scm | |
| parent | d5b6b4d8b1a6f0c199c03577c04b697f7ba739f4 (diff) | |
gnu: Add gst-plugins-rs.
* gnu/packages/gstreamer.scm (gst-plugins-rs): New variable.
Change-Id: I78a4eb6f222956f519884ddf3f424110e28f5e32
Co-authored-by: Noé Lopez <noelopez@free.fr>
Diffstat (limited to 'gnu/packages/gstreamer.scm')
| -rw-r--r-- | gnu/packages/gstreamer.scm | 196 |
1 files changed, 195 insertions, 1 deletions
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index f26cac13310..0eced27328a 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm | |||
| @@ -10,9 +10,10 @@ | |||
| 10 | ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> | 10 | ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> |
| 11 | ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com> | 11 | ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com> |
| 12 | ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> | 12 | ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> |
| 13 | ;;; Copyright © 2023-2025 Maxim Cournoyer <maxim@guixotic.coop> | 13 | ;;; Copyright © 2023-2026 Maxim Cournoyer <maxim@guixotic.coop> |
| 14 | ;;; Copyright © 2024 Remco van 't Veer <remco@remworks.net> | 14 | ;;; Copyright © 2024 Remco van 't Veer <remco@remworks.net> |
| 15 | ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org> | 15 | ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org> |
| 16 | ;;; Copyright © 2026 Noé Lopez <noelopez@free.fr> | ||
| 16 | ;;; | 17 | ;;; |
| 17 | ;;; This file is part of GNU Guix. | 18 | ;;; This file is part of GNU Guix. |
| 18 | ;;; | 19 | ;;; |
| @@ -35,6 +36,7 @@ | |||
| 35 | #:use-module (guix gexp) | 36 | #:use-module (guix gexp) |
| 36 | #:use-module (guix download) | 37 | #:use-module (guix download) |
| 37 | #:use-module (guix git-download) | 38 | #:use-module (guix git-download) |
| 39 | #:use-module (guix build-system cargo) | ||
| 38 | #:use-module (guix build-system gnu) | 40 | #:use-module (guix build-system gnu) |
| 39 | #:use-module (guix build-system meson) | 41 | #:use-module (guix build-system meson) |
| 40 | #:use-module (guix build-system pyproject) | 42 | #:use-module (guix build-system pyproject) |
| @@ -49,6 +51,7 @@ | |||
| 49 | #:use-module (gnu packages bison) | 51 | #:use-module (gnu packages bison) |
| 50 | #:use-module (gnu packages build-tools) | 52 | #:use-module (gnu packages build-tools) |
| 51 | #:use-module (gnu packages cdrom) | 53 | #:use-module (gnu packages cdrom) |
| 54 | #:use-module (gnu packages crypto) | ||
| 52 | #:use-module (gnu packages curl) | 55 | #:use-module (gnu packages curl) |
| 53 | #:use-module (gnu packages compression) | 56 | #:use-module (gnu packages compression) |
| 54 | #:use-module (gnu packages documentation) | 57 | #:use-module (gnu packages documentation) |
| @@ -84,6 +87,8 @@ | |||
| 84 | #:use-module (gnu packages pulseaudio) | 87 | #:use-module (gnu packages pulseaudio) |
| 85 | #:use-module (gnu packages qt) | 88 | #:use-module (gnu packages qt) |
| 86 | #:use-module (gnu packages rdf) | 89 | #:use-module (gnu packages rdf) |
| 90 | #:use-module (gnu packages rust) | ||
| 91 | #:use-module (gnu packages rust-apps) | ||
| 87 | #:use-module (gnu packages sdl) | 92 | #:use-module (gnu packages sdl) |
| 88 | #:use-module (gnu packages shells) | 93 | #:use-module (gnu packages shells) |
| 89 | #:use-module (gnu packages video) | 94 | #:use-module (gnu packages video) |
| @@ -955,6 +960,195 @@ model to base your own plug-in on, here it is.") | |||
| 955 | par compared to the rest.") | 960 | par compared to the rest.") |
| 956 | (license license:lgpl2.0+))) | 961 | (license license:lgpl2.0+))) |
| 957 | 962 | ||
| 963 | (define-public gst-plugins-rs | ||
| 964 | (package | ||
| 965 | (name "gst-plugins-rs") | ||
| 966 | (version "1.28.1") | ||
| 967 | (source | ||
| 968 | (origin | ||
| 969 | (method git-fetch) | ||
| 970 | (uri (git-reference | ||
| 971 | (url (string-append "https://gitlab.freedesktop.org/gstreamer/" | ||
| 972 | name ".git")) | ||
| 973 | (commit (string-append "gstreamer-" version)))) | ||
| 974 | (file-name (git-file-name name version)) | ||
| 975 | (sha256 | ||
| 976 | (base32 | ||
| 977 | "1sfmjrmzqd87fg1y97ysj2348s256dra8wzh7fsbv6a9jd3k76h4")))) | ||
| 978 | (build-system meson-build-system) | ||
| 979 | (outputs '("out" ;mux, text, utils and generic plugins | ||
| 980 | "analytics" | ||
| 981 | "audio" | ||
| 982 | "net" | ||
| 983 | "video")) | ||
| 984 | (properties | ||
| 985 | `((output-synopsis "out" "generic, mux, text and utils plugins"))) | ||
| 986 | (arguments | ||
| 987 | (list | ||
| 988 | #:glib-or-gtk? #t | ||
| 989 | #:imported-modules `(,@%meson-build-system-modules | ||
| 990 | ,@%cargo-build-system-modules) | ||
| 991 | #:modules `(((guix build cargo-build-system) #:prefix cargo:) | ||
| 992 | (guix build meson-build-system) | ||
| 993 | (guix build utils) | ||
| 994 | (ice-9 match)) | ||
| 995 | #:configure-flags | ||
| 996 | #~(list "-Ddebugseimetainserter=disabled" ;test fails | ||
| 997 | "-Ddoc=disabled" ;requires hotdoc | ||
| 998 | "-Delevenlabs=disabled" ;test fails | ||
| 999 | "-Dexamples=disabled" ;causes cargo feature conflicts | ||
| 1000 | "-Dhlssink3=disabled" ;test fails | ||
| 1001 | "-Disobmff=disabled" ;test fails | ||
| 1002 | "-Dquinn=disabled" ;test fails | ||
| 1003 | "-Dskia=disabled" ;attempts to download binaries | ||
| 1004 | "-Dsodium-source=system" | ||
| 1005 | ;; The 'spotify' option causes the build error: "the trait | ||
| 1006 | ;; bound `vergen::feature::build::Build: | ||
| 1007 | ;; vergen_lib::entries::Add` is not satisfied" | ||
| 1008 | "-Dspotify=disabled" | ||
| 1009 | "-Dtests=enabled" | ||
| 1010 | "-Dtracers=disabled" ;test fails | ||
| 1011 | "-Dthreadshare=disabled" ;test fails | ||
| 1012 | "-Dvalidate=disabled" ;requires gst-devtools | ||
| 1013 | "-Dwebrtc=disabled" ;test fails | ||
| 1014 | ;; The 'whisper' option causes "failed to run custom build | ||
| 1015 | ;; command for `whisper-rs-sys v0.14.1`". | ||
| 1016 | "-Dwhisper=disabled") | ||
| 1017 | #:phases | ||
| 1018 | #~(modify-phases %standard-phases | ||
| 1019 | (add-after 'unpack 'use-guix-vendored-dependencies | ||
| 1020 | (lambda _ | ||
| 1021 | (substitute* "Cargo.toml" | ||
| 1022 | ;; Prefer to fetch the released crates from crates.io | ||
| 1023 | ;; instead of fetching them from Git. | ||
| 1024 | (("git =.*, branch = \"[^\"]+\",") | ||
| 1025 | "")) | ||
| 1026 | ;; Override dependencies declared with git repos/revisions. | ||
| 1027 | (substitute* "mux/flavors/Cargo.toml" | ||
| 1028 | (("flavors = .*") | ||
| 1029 | "flavors = \"*\"\n")) | ||
| 1030 | (substitute* "video/ffv1/Cargo.toml" | ||
| 1031 | (("ffv1 = .*") | ||
| 1032 | "ffv1 = \"*\"\n")))) | ||
| 1033 | (add-after 'unpack 'delete-conflicting-cargo-config | ||
| 1034 | (lambda _ | ||
| 1035 | (delete-file ".cargo/config.toml"))) | ||
| 1036 | (add-after 'unpack 'prepare-cargo-build-system | ||
| 1037 | (lambda args | ||
| 1038 | (for-each | ||
| 1039 | (lambda (phase) | ||
| 1040 | (format #t "Running cargo phase: ~a~%" phase) | ||
| 1041 | (apply (assoc-ref cargo:%standard-phases phase) | ||
| 1042 | #:cargo-target #$(cargo-triplet) | ||
| 1043 | args)) | ||
| 1044 | '(unpack-rust-crates | ||
| 1045 | configure | ||
| 1046 | check-for-pregenerated-files | ||
| 1047 | patch-cargo-checksums)))) | ||
| 1048 | (add-before 'check 'make-HOME-writable | ||
| 1049 | (lambda _ | ||
| 1050 | ;; Some tests like 'hlssink3' require a writable HOME directory. | ||
| 1051 | (setenv "HOME" "/tmp"))) | ||
| 1052 | (add-after 'install 'split-into-outputs | ||
| 1053 | (lambda _ | ||
| 1054 | (let ((plugins-dir "/lib/gstreamer-1.0/") | ||
| 1055 | (install-plan `((,#$output:analytics | ||
| 1056 | . ("libgstburn.so" | ||
| 1057 | "libgstrsanalytics.so")) | ||
| 1058 | (,#$output:audio | ||
| 1059 | . ("libgstclaxon.so" | ||
| 1060 | "libgstdemucs.so" | ||
| 1061 | "libgstlewton.so" | ||
| 1062 | "libgstrsaudiofx.so" | ||
| 1063 | "libgstrsaudioparsers.so" | ||
| 1064 | "libgstspeechmatics.so")) | ||
| 1065 | (,#$output:net | ||
| 1066 | . ("libgstdeepgram.so" | ||
| 1067 | "libgsthlsmultivariantsink.so" | ||
| 1068 | "libgsticecast.so" | ||
| 1069 | "libgstmpegtslive.so" | ||
| 1070 | "libgstndi.so" | ||
| 1071 | "libgstraptorq.so" | ||
| 1072 | "libgstreqwest.so" | ||
| 1073 | "libgstrsonvif.so" | ||
| 1074 | "libgstrsrtp.so" | ||
| 1075 | "libgstrsrtsp.so" | ||
| 1076 | "libgstwebrtchttp.so")) | ||
| 1077 | (,#$output:video | ||
| 1078 | . ("libgstcdg.so" | ||
| 1079 | "libgstffv1.so" | ||
| 1080 | "libgstgif.so" | ||
| 1081 | "libgstgtk4.so" | ||
| 1082 | "libgsthsv.so" | ||
| 1083 | "libgstrav1e.so" | ||
| 1084 | "libgstrsclosedcaption.so" | ||
| 1085 | "libgstrspng.so" | ||
| 1086 | "libgstrsvideofx.so")) | ||
| 1087 | ;; We leave the generic, mux, text and | ||
| 1088 | ;; utils plugins in the default output, as | ||
| 1089 | ;; they are often relied on in gstreamer | ||
| 1090 | ;; pipelines. | ||
| 1091 | ;; (,#$output:generic | ||
| 1092 | ;; . ("libgstrsfile.so" | ||
| 1093 | ;; "libgstrsinter.so" | ||
| 1094 | ;; "libgstgopbuffer.so" | ||
| 1095 | ;; "libgstoriginalbuffer.so" | ||
| 1096 | ;; "libgstsodium.so" | ||
| 1097 | ;; "libgststreamgrouper.so")) | ||
| 1098 | ;; (,#$output:mux | ||
| 1099 | ;; . ("libgstrsflv.so")) | ||
| 1100 | ;; (,#$output:text | ||
| 1101 | ;; . ("libgstjson.so" | ||
| 1102 | ;; "libgstregex.so" | ||
| 1103 | ;; "libgsttextaccumulate.so" | ||
| 1104 | ;; "libgsttextahead.so" | ||
| 1105 | ;; "libgsttextwrap.so")) | ||
| 1106 | ;; (,#$output:utils | ||
| 1107 | ;; . ("libgstfallbackswitch.so" | ||
| 1108 | ;; "libgstlivesync.so" | ||
| 1109 | ;; "libgsttogglerecord.so" | ||
| 1110 | ;; "libgsturiplaylistbin.so")) | ||
| 1111 | ))) | ||
| 1112 | (for-each (match-lambda | ||
| 1113 | ((out . plugins) | ||
| 1114 | (let ((src (string-append #$output plugins-dir)) | ||
| 1115 | (dest (string-append out plugins-dir))) | ||
| 1116 | (mkdir-p dest) | ||
| 1117 | (for-each (lambda (p) | ||
| 1118 | (rename-file (string-append src p) | ||
| 1119 | (string-append dest p))) | ||
| 1120 | plugins)))) | ||
| 1121 | install-plan))))))) | ||
| 1122 | (home-page "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs") | ||
| 1123 | (native-inputs | ||
| 1124 | (list gst-plugins-good ;provides elements used in some tests | ||
| 1125 | nasm | ||
| 1126 | pkg-config | ||
| 1127 | python | ||
| 1128 | rust | ||
| 1129 | rust-cargo-c)) | ||
| 1130 | (inputs | ||
| 1131 | (cons* csound | ||
| 1132 | gstreamer | ||
| 1133 | gst-plugins-bad | ||
| 1134 | gst-plugins-base | ||
| 1135 | gst-plugins-good | ||
| 1136 | gtk | ||
| 1137 | libsodium | ||
| 1138 | `(,zstd "lib") | ||
| 1139 | (cargo-inputs 'gst-plugins-rs))) | ||
| 1140 | (synopsis "GStreamer plugins written in Rust") | ||
| 1141 | (description "This package provides a collection of GStreamer plugins | ||
| 1142 | written in Rust. The plugins cover many areas such as networking, audio, | ||
| 1143 | video, text, and analytics. The default output contains the mux, text, utils | ||
| 1144 | and generic plugins, while the other plugins are grouped in outputs named | ||
| 1145 | after their category.") | ||
| 1146 | ;; The various plugins in the collection are covered by one of the | ||
| 1147 | ;; following licneses. | ||
| 1148 | (license (list license:mpl2.0 | ||
| 1149 | license:asl2.0 | ||
| 1150 | license:expat)))) | ||
| 1151 | |||
| 958 | (define-public gst-plugins-ugly | 1152 | (define-public gst-plugins-ugly |
| 959 | (package | 1153 | (package |
| 960 | (name "gst-plugins-ugly") | 1154 | (name "gst-plugins-ugly") |
