X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=shell.nix;h=f9d896259e7b7edee0424f0a3a917aaf54234bee;hp=6f729fd156c87ad9e01b5ab095253dbd20bc7a3f;hb=3db5f47bade7e2b8eb36c0c77398e6c1e10a6e55;hpb=c2bc765dc63c3e9803c51c1643ad8f5436dbc38f diff --git a/shell.nix b/shell.nix index 6f729fd156..f9d896259e 100644 --- a/shell.nix +++ b/shell.nix @@ -31,11 +31,22 @@ in makeWrapper ]; shellHook = '' + # Set Gdk pixbuf loaders file to the one from the build dependencies here + unset GDK_PIXBUF_MODULE_FILE + # Defined in gdk-pixbuf setup hook + findGdkPixbufLoaders "${pkgs.librsvg}" + wrapFactor () { [ -n "$1" ] || { printf "Usage: wrapFactor " ; return; } local root="$(realpath $1)" local binary="''${root}/factor" + local wrapped="''${root}/.factor-wrapped" + # Remove the wrapped binary if a new VM has been compiled + ${lib.getBin file}/bin/file "$binary" |grep ELF >/dev/null && rm -f "$wrapped" + # Restore the factor binary if it was already wrapped + [ -e "$wrapped" ] && { mv "$wrapped" "$binary" ; } wrapProgram "$binary" --prefix LD_LIBRARY_PATH : ${runtimeLibPath} \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ --argv0 factor ln -sf "''${root}/factor.image" "''${root}/.factor-wrapped.image" }