From d3662ff5cc64864c7791ca6a6aa273d003b35d9d Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 17 Jul 2024 17:11:58 +0200 Subject: [PATCH] nix: set GST_PLUGIN_SYSTEM_PATH_1_0 and GIO_MODULE_DIR in shell This fixes `cargo run` on NixOS. Also, remove the commented-out gst-plugins-ugly from the list, we apparently don't need it. --- nix/configuration.nix | 1 - nix/default.nix | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nix/configuration.nix b/nix/configuration.nix index 0899806..e6cd8a5 100644 --- a/nix/configuration.nix +++ b/nix/configuration.nix @@ -80,7 +80,6 @@ gst-plugins-base gst-plugins-good gst-plugins-bad - # gst-plugins-ugly gst-libav ]); GIO_MODULE_DIR = "${pkgs.glib-networking}/lib/gio/modules/"; diff --git a/nix/default.nix b/nix/default.nix index 0e7c1b9..0a25f3b 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -47,6 +47,14 @@ rec { text = '' export NIX_PATH=nixpkgs=${toString pkgs.path} export PKG_CONFIG_PATH=${pkgs.lib.makeSearchPathOutput "dev" "lib/pkgconfig" rust_sys_dep_libs} + export GST_PLUGIN_SYSTEM_PATH_1_0=${pkgs.lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with pkgs.gst_all_1;[ + gstreamer + gst-plugins-base + gst-plugins-good + gst-plugins-bad + gst-libav + ])} + export GIO_MODULE_DIR="${pkgs.glib-networking}/lib/gio/modules/" ''; };