diff --git a/Dist/launch-scripts.nix b/Dist/launch-scripts.nix index 04b56535a8..c125bd0271 100644 --- a/Dist/launch-scripts.nix +++ b/Dist/launch-scripts.nix @@ -89,6 +89,7 @@ fixed by adding `${pkgs.gtk2-x11.out}/lib` to `$LD_LIBRARY_PATH` we're now in Adwaita (light) instead of ugly beige! this does add a new warning to stderr though: `Unable to locate theme engine in module_path: "adwaita"` + fixed by adding `${pkgs.gnome3.gnome-themes-extra}/lib/gtk-2.0` to `$GTK_PATH` sadly, it still doesn't seem to respect `$GTK_RC_FILES` or even `$GTK_THEME` :( */}ldLibPath="$BIZHAWK_INT_SYSLIB_PATH:${lib.makeLibraryPath bizhawkAssemblies.buildInputs}" if [ -z "$LD_LIBRARY_PATH" ]; then @@ -96,6 +97,11 @@ else export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ldLibPath" fi + if [ -z "$GTK_PATH" ]; then + export GTK_PATH='${bizhawkAssemblies.gnome-themes-extra}/lib/gtk-2.0' + else + export GTK_PATH="${bizhawkAssemblies.gnome-themes-extra}/lib/gtk-2.0:$GTK_PATH" + fi ${if profileManagedCalls == false then "" else ''printf "Will write profiling results to %s/*.mlpd\n" "$PWD" ''}${if bizhawkAssemblies.hawkSourceInfo.hasAssemblyResolveHandler then "" else ''export MONO_PATH="$BIZHAWK_HOME/dll/nlua:$BIZHAWK_HOME/dll" ''}${lib.optionalString (!debugPInvokes) "# "}export MONO_LOG_LEVEL=debug MONO_LOG_MASK=dll # pass `--arg debugPInvokes true` to nix-build to enable diff --git a/Dist/packages.nix b/Dist/packages.nix index 6e753d69b5..abbcbadc94 100644 --- a/Dist/packages.nix +++ b/Dist/packages.nix @@ -16,6 +16,7 @@ # makedeps , git # rundeps +, gnome-themes-extra , gtk2-x11 , libgdiplus , libGL @@ -81,7 +82,7 @@ hawkSourceInfo = populateHawkSourceInfo hawkSourceInfo'; extraManagedDeps = hawkSourceInfo.extraManagedDeps or buildExtraManagedDepsFor hawkSourceInfo; in buildDotnetModule (lib.fix (finalAttrs: { # proper `finalAttrs` not supported >:( - inherit doCheck mono; + inherit doCheck gnome-themes-extra mono; inherit (hawkSourceInfo) __contentAddressed dotnet-sdk nugetDeps src version; pname = "BizHawk"; isLocalBuild = lib.hasSuffix "-local" finalAttrs.version; @@ -175,7 +176,7 @@ passthru = { inherit extraManagedDeps # could use this to backport changes to ExternalProjects? IDK hawkSourceInfo; # simple way to override `nugetDeps` for patching: `buildAssembliesFor (bizhawkAssemblies-latest.hawkSourceInfo // { nugetDeps = /*...*/; })` - inherit (finalAttrs) mono; + inherit (finalAttrs) gnome-themes-extra mono; # extraUnmanagedDeps = buildUnmanagedDepsFor hawkSourceInfo; # this will override the output of the same name, example: `buildEmuHawkInstallableFor { bizhawkAssemblies = bizhawkAssemblies-latest // { extraUnmanagedDeps = /*...*/; }; }` # can similarly override `assets` output, only used by launch script to populate `BIZHAWK_DATA_HOME` if the dir doesn't exist at runtime, # and `waterboxCores` output, which holds just the Waterbox cores, as the name suggests diff --git a/default.nix b/default.nix index f2e208eb65..bf57ad7435 100644 --- a/default.nix +++ b/default.nix @@ -38,6 +38,7 @@ in { , git ? pkgs.gitMinimal # only when building from-CWD (`-local`) # rundeps , coreutils ? pkgs.coreutils +, gnome-themes-extra ? pkgs.gnome3.gnome-themes-extra , gtk2-x11 ? pkgs.gtk2-x11 , kate ? pkgs.kate.overrideAttrs (oldAttrs: { patches = (oldAttrs.patches or []) ++ [ (fetchpatch { @@ -111,7 +112,7 @@ in { buildDotnetModule fetchpatch fetchzip hardLinkJoin launchScriptsFor makeDesktopItem releaseTagSourceInfos runCommand symlinkJoin writeShellScriptBin git - gtk2-x11 libgdiplus libGL lua openal SDL2 udev zstd + gnome-themes-extra gtk2-x11 libgdiplus libGL lua openal SDL2 udev zstd buildConfig doCheck extraDefines extraDotnetBuildFlags; mono = if mono != null then mono # allow older Mono if set explicitly