fix: allows nix to execute dynamic executables

This commit is contained in:
ShyProton 2024-01-28 18:14:33 -05:00
parent 641264823f
commit a80d21f679

View File

@ -57,14 +57,30 @@
crow crow
gnumake gnumake
]; ];
libraries = with pkgs; [
curl
cjson
webkitgtk
gtk3
cairo
gdk-pixbuf
glib
dbus
openssl_3
librsvg
];
in { in {
devShells.${system}.default = pkgs.mkShell { devShells.${system}.default = pkgs.mkShell {
buildInputs = packages; buildInputs = packages;
shellHook = with pkgs; '' NIX_LD = with pkgs;
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS; runCommand "ld.so" {} ''
export GIO_MODULE_DIR="${glib-networking}/lib/gio/modules/"; ln -s "$(cat '${stdenv.cc}/nix-support/dynamic-linker')" $out
''; '';
NIX_LD_LIBRARY_PATH = with pkgs; "${lib.makeLibraryPath libraries}:$NIX_LD_LIBRARY_PATH";
XDG_DATA_DIRS = with pkgs; "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS;";
GIO_MODULE_DIR = with pkgs; "${glib-networking}/lib/gio/modules/";
}; };
}; };
} }