Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gst_all_1: use newScope to create package set #110459

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions pkgs/development/libraries/gstreamer/default.nix
Original file line number Diff line number Diff line change
@@ -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
}
})
36 changes: 10 additions & 26 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should avoid this pattern in package sets: using the callPackage from a different scope breaks composition. In these cases it is in my opinion much better to pass in the subpackage set.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related RFC NixOS/rfcs#83.


mons = callPackage ../tools/misc/mons {};

Expand Down Expand Up @@ -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 { };

Expand Down Expand Up @@ -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 {};

Expand Down Expand Up @@ -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;
};

Expand Down Expand Up @@ -13800,8 +13791,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 { };
Expand Down Expand Up @@ -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++ { };
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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 { };

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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; };
};

Expand Down