about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix23
1 files changed, 17 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix
index 049e8a99f095..05133271f846 100644
--- a/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix
@@ -19,17 +19,18 @@
 , IOKit
 , CoreFoundation
 , DiskArbitration
+, enableGplPlugins ? true
 }:
 
 stdenv.mkDerivation rec {
   pname = "gst-plugins-ugly";
-  version = "1.18.4";
+  version = "1.20.0";
 
   outputs = [ "out" "dev" ];
 
   src = fetchurl {
     url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "0g6i4db1883q3j0l2gdv46fcqwiiaw63n6mhvsfcms1i1p7g1391";
+    sha256 = "sha256-To3LXSZVLwpJN/a8Ynm9kHD1XKauDqoy1y0mTEQAHC4=";
   };
 
   nativeBuildInputs = [
@@ -43,14 +44,15 @@ stdenv.mkDerivation rec {
   buildInputs = [
     gst-plugins-base
     orc
+    libintl
+    opencore-amr
+  ] ++ lib.optionals enableGplPlugins [
     a52dec
     libcdio
     libdvdread
     libmad
     libmpeg2
     x264
-    libintl
-    opencore-amr
   ] ++ lib.optionals stdenv.isDarwin [
     IOKit
     CoreFoundation
@@ -60,7 +62,16 @@ stdenv.mkDerivation rec {
   mesonFlags = [
     "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing
     "-Dsidplay=disabled" # sidplay / sidplay/player.h isn't packaged in nixpkgs as of writing
-  ];
+  ] ++ (if enableGplPlugins then [
+    "-Dgpl=enabled"
+  ] else [
+    "-Da52dec=disabled"
+    "-Dcdio=disabled"
+    "-Ddvdread=disabled"
+    "-Dmpeg2dec=disabled"
+    "-Dsidplay=disabled"
+    "-Dx264=disabled"
+  ]);
 
   postPatch = ''
     patchShebangs \
@@ -76,7 +87,7 @@ stdenv.mkDerivation rec {
       the plug-ins or the supporting libraries might not be how we'd
       like. The code might be widely known to present patent problems.
     '';
-    license = licenses.lgpl2Plus;
+    license = if enableGplPlugins then licenses.gpl2Plus else licenses.lgpl2Plus;
     platforms = platforms.unix;
     maintainers = with maintainers; [ matthewbauer ];
   };