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

WIP: gst_all_1.gst-plugins-bad: try grafting opencv4 to avoid rebuilds tri… #1

Closed
wants to merge 1 commit 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
21 changes: 19 additions & 2 deletions pkgs/development/libraries/gstreamer/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ callPackage, AudioToolbox, AVFoundation, Cocoa, CoreFoundation, CoreMedia, CoreServices, CoreVideo, DiskArbitration, Foundation, IOKit, MediaToolbox, OpenGL, VideoToolbox }:
{ callPackage, AudioToolbox, AVFoundation, Cocoa, CoreFoundation, CoreMedia, CoreServices, CoreVideo, DiskArbitration, Foundation, IOKit, MediaToolbox, OpenGL, VideoToolbox,
replaceDependency,
opencv4WithoutOverrides,
opencv4,
graftOpenCV ? true
}:

{
gstreamer = callPackage ./core { inherit CoreServices; };
Expand All @@ -9,7 +14,19 @@

gst-plugins-good = callPackage ./good { inherit Cocoa; };

gst-plugins-bad = callPackage ./bad { inherit AudioToolbox AVFoundation CoreMedia CoreVideo Foundation MediaToolbox VideoToolbox; };
gst-plugins-bad =
let
original = callPackage ./bad {
inherit AudioToolbox AVFoundation CoreMedia CoreVideo Foundation MediaToolbox VideoToolbox;
opencv4 = opencv4WithoutOverrides;
};
grafted = replaceDependency {
drv = original;
oldDependency = opencv4WithoutOverrides;
newDependency = opencv4;
};
Comment on lines +23 to +27
Copy link
Owner Author

Choose a reason for hiding this comment

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

nix eval -f with-my-cuda.nix chromium.outPath
"/nix/store/c6dkgb92bqhqllb4mdhrq7li8n2ay2ic-chromium-111.0.5563.110"nix eval .#chromium.outPath
error: 'builtins.storePath' is not allowed in pure evaluation mode

       at /nix/store/hzvq8ss6vibgl5p0balj8vqrp57fligv-source/pkgs/build-support/replace-dependency.nix:49:18:

           48|
           49|   oldStorepath = builtins.storePath (discard (toString oldDependency));
             |                  ^
           50|
(use '--show-trace' to show detailed location information)

in
grafted;

gst-plugins-ugly = callPackage ./ugly { inherit CoreFoundation DiskArbitration IOKit; };

Expand Down
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22879,6 +22879,10 @@ with pkgs;
ffmpeg = ffmpeg_4;
};

opencv4WithoutOverrides = opencv4.override {
config = { };
};

opencv = opencv4;

imath = callPackage ../development/libraries/imath { };
Expand Down