Skip to content

Instantly share code, notes, and snippets.

@kirelagin
Created October 27, 2019 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirelagin/b0f1eeb8706a0e4e64bda2b59371ba4a to your computer and use it in GitHub Desktop.
Save kirelagin/b0f1eeb8706a0e4e64bda2b59371ba4a to your computer and use it in GitHub Desktop.
let
pkgs = import <nixpkgs> {};
inherit (pkgs) runCommand lib;
gst = pkgs.gst_all_1;
components = with gst; [
gstreamer
gst-plugins-good
gst-plugins-base
gst-plugins-bad
gst-plugins-ugly
];
searchPath = lib.makeSearchPath "lib/gstreamer-1.0" components;
in
runCommand "boing" {
GST_PLUGIN_PATH = searchPath;
buildInputs = [ gst.gstreamer pkgs.makeWrapper ];
} ''
mkdir -p "$out"/bin
makeWrapper "${gst.gstreamer.dev}"/bin/gst-launch-1.0 $out/bin/gst-launch --set GST_PLUGIN_PATH "${searchPath}"
makeWrapper "${gst.gstreamer.dev}"/bin/gst-inspect-1.0 $out/bin/gst-inspect --set GST_PLUGIN_PATH "${searchPath}"
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment