X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=shell.nix;h=3a91384c87e6e7f1b4b4296b626e3fc4f3ee6bc9;hp=3ca255579c024c45a1ebbf1765690d1df94ac781;hb=ec35f477b2ae33f24e30dcb33128acd530f1366f;hpb=1928e6094ea644b24e511e5c21036729b017f98d diff --git a/shell.nix b/shell.nix index 3ca255579c..3a91384c87 100644 --- a/shell.nix +++ b/shell.nix @@ -5,9 +5,6 @@ let runtimeLibs = with xorg; [ glib pango cairo - gtk2-x11 - gdk_pixbuf - gnome2.gtkglext pcre libGL libGLU @@ -18,7 +15,11 @@ let libogg libvorbis zlib - ]; + ] ++ (if stdenv.isDarwin then [] else [ + gtk2-x11 + gdk_pixbuf + gnome2.gtkglext + ]); runtimeLibPath = "/run/opengl-driver/lib:" + lib.makeLibraryPath runtimeLibs; in (mkClangShell { @@ -29,8 +30,13 @@ in git curl makeWrapper - ]; + ] ++ (if stdenv.isDarwin then [darwin.apple_sdk.frameworks.Cocoa] else []); 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)" @@ -41,6 +47,7 @@ in # 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" }