From e5c418fa0162849bdf52478d5812204f524f4046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Fri, 22 Jan 2021 10:18:40 +0100 Subject: [PATCH 1/2] gst_all_1: use newScope to create package set --- .../libraries/gstreamer/default.nix | 26 +++++++++---------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/default.nix index 1fdd67d836e72..b091bba085cf8 100644 --- a/pkgs/development/libraries/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/default.nix @@ -1,29 +1,27 @@ -{ callPackage, CoreServices }: +{ lib, newScope, libav, CoreServices }: -rec { +lib.makeScope newScope (self: with self; { gstreamer = callPackage ./core { inherit CoreServices; }; gstreamermm = callPackage ./gstreamermm { }; - gst-plugins-base = callPackage ./base { inherit gstreamer; }; + gst-plugins-base = callPackage ./base { }; - gst-plugins-good = callPackage ./good { inherit gst-plugins-base; }; + gst-plugins-good = callPackage ./good { }; - gst-plugins-bad = callPackage ./bad { inherit gst-plugins-base; }; + gst-plugins-bad = callPackage ./bad { }; - gst-plugins-ugly = callPackage ./ugly { inherit gst-plugins-base; }; + gst-plugins-ugly = callPackage ./ugly { }; - gst-rtsp-server = callPackage ./rtsp-server { inherit gst-plugins-base gst-plugins-bad; }; + gst-rtsp-server = callPackage ./rtsp-server { }; - gst-libav = callPackage ./libav { inherit gst-plugins-base; }; + gst-libav = callPackage ./libav { inherit libav; }; - gst-devtools = callPackage ./devtools { inherit gstreamer gst-plugins-base; }; + gst-devtools = callPackage ./devtools { }; - gst-editing-services = callPackage ./ges { inherit gst-plugins-base gst-plugins-bad gst-devtools; }; + gst-editing-services = callPackage ./ges { }; - gst-vaapi = callPackage ./vaapi { - inherit gst-plugins-base gstreamer gst-plugins-bad; - }; + gst-vaapi = callPackage ./vaapi { }; # note: gst-python is in ./python/default.nix - called under pythonPackages -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4158844db8ddd..cd8350d40e801 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13800,8 +13800,8 @@ in gsettings-qt = libsForQt5.callPackage ../development/libraries/gsettings-qt { }; gst_all_1 = recurseIntoAttrs(callPackage ../development/libraries/gstreamer { - callPackage = newScope { libav = pkgs.ffmpeg; }; inherit (darwin.apple_sdk.frameworks) CoreServices; + libav = ffmpeg; }); gusb = callPackage ../development/libraries/gusb { }; From 475cd0381a4509ef977af3117e7f08d2f6d6035b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Fri, 22 Jan 2021 10:43:00 +0100 Subject: [PATCH 2/2] pkgs: use gst_all_1.callPackage --- pkgs/top-level/all-packages.nix | 34 +++++++++------------------------ 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd8350d40e801..e86f4c94b286e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2534,9 +2534,7 @@ in monetdb = callPackage ../servers/sql/monetdb { }; - monado = callPackage ../applications/graphics/monado { - inherit (gst_all_1) gstreamer gst-plugins-base; - }; + monado = gst_all_1.callPackage ../applications/graphics/monado { }; mons = callPackage ../tools/misc/mons {}; @@ -4582,9 +4580,7 @@ in glxinfo = callPackage ../tools/graphics/glxinfo { }; - gmrender-resurrect = callPackage ../tools/networking/gmrender-resurrect { - inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav; - }; + gmrender-resurrect = gst_all_1.callPackage ../tools/networking/gmrender-resurrect { }; gmvault = callPackage ../tools/networking/gmvault { }; @@ -12919,9 +12915,7 @@ in # apr with db58 on freebsd (nov 2015), for unknown reasons }; - aravis = callPackage ../development/libraries/aravis { - inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad; - }; + aravis = gst_all_1.callPackage ../development/libraries/aravis { }; arb = callPackage ../development/libraries/arb {}; @@ -13394,10 +13388,7 @@ in farbfeld = callPackage ../development/libraries/farbfeld { }; - farstream = callPackage ../development/libraries/farstream { - inherit (gst_all_1) - gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad - gst-libav; + farstream = gst_all_1.callPackage ../development/libraries/farstream { autoreconfHook = buildPackages.autoreconfHook269; }; @@ -16939,9 +16930,8 @@ in wcslib = callPackage ../development/libraries/wcslib { }; - webkitgtk = callPackage ../development/libraries/webkitgtk { + webkitgtk = gst_all_1.callPackage ../development/libraries/webkitgtk { harfbuzz = harfbuzzFull; - inherit (gst_all_1) gst-plugins-base gst-plugins-bad; }; websocketpp = callPackage ../development/libraries/websocket++ { }; @@ -22110,9 +22100,7 @@ in xrdp = callPackage ../applications/networking/remote/xrdp { }; - freerdp = callPackage ../applications/networking/remote/freerdp { - inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good; - }; + freerdp = gst_all_1.callPackage ../applications/networking/remote/freerdp { }; freerdpUnstable = freerdp; @@ -24019,9 +24007,7 @@ in pdftk-legacy = lowPrio (callPackage ../tools/typesetting/pdftk/legacy.nix { }); pdfgrep = callPackage ../tools/typesetting/pdfgrep { }; - pdfpc = callPackage ../applications/misc/pdfpc { - inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-libav; - }; + pdfpc = gst_all_1.callPackage ../applications/misc/pdfpc { }; peach = callPackage ../servers/peach { }; @@ -25488,9 +25474,8 @@ in worker = callPackage ../applications/misc/worker { }; - workrave = callPackage ../applications/misc/workrave { + workrave = gst_all_1.callPackage ../applications/misc/workrave { inherit (python27Packages) cheetah; - inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good; }; worldengine-cli = python3Packages.worldengine; @@ -28408,8 +28393,7 @@ in fuse-emulator = callPackage ../misc/emulators/fuse-emulator {}; - gajim = callPackage ../applications/networking/instant-messengers/gajim { - inherit (gst_all_1) gstreamer gst-plugins-base gst-libav; + gajim = gst_all_1.callPackage ../applications/networking/instant-messengers/gajim { gst-plugins-good = gst_all_1.gst-plugins-good.override { gtkSupport = true; }; };