Skip to content

Commit 9a2c163

Browse files
committed
Nix expr: Add gtk2-x11 (libgtk-x11-2.0.so.0) to buildInputs
1 parent 8bfe963 commit 9a2c163

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

Dist/launch-scripts.nix

+8-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,14 @@
8383
fi
8484
8585
${if isManualLocalBuild then noAssetManagementScript else assetManagementScript}
86-
ldLibPath="$BIZHAWK_INT_SYSLIB_PATH:${lib.makeLibraryPath bizhawkAssemblies.buildInputs}"
86+
${""/*
87+
here's the breakdown for the GTK theme problem:
88+
problem 1: `Gtk not found (missing LD_LIBRARY_PATH to libgtk-x11-2.0.so.0?), using built-in colorscheme` printed to stderr
89+
fixed by adding `${pkgs.gtk2-x11.out}/lib` to `$LD_LIBRARY_PATH`
90+
we're now in Adwaita (light) instead of ugly beige!
91+
this does add a new warning to stderr though: `Unable to locate theme engine in module_path: "adwaita"`
92+
sadly, it still doesn't seem to respect `$GTK_RC_FILES` or even `$GTK_THEME` :(
93+
*/}ldLibPath="$BIZHAWK_INT_SYSLIB_PATH:${lib.makeLibraryPath bizhawkAssemblies.buildInputs}"
8794
if [ -z "$LD_LIBRARY_PATH" ]; then
8895
export LD_LIBRARY_PATH="$ldLibPath"
8996
else

Dist/packages.nix

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# makedeps
1717
, git
1818
# rundeps
19+
, gtk2-x11
1920
, libgdiplus
2021
, libGL
2122
, lua
@@ -63,7 +64,8 @@
6364
'';
6465
dontFixup = true;
6566
};
66-
genDepsHostTargetFor = { hawkSourceInfo, mono' ? mono }: [
67+
genDepsHostTargetFor = { hawkSourceInfo, gtk2-x11' ? getMainOutput gtk2-x11, mono' ? mono }: [
68+
gtk2-x11'
6769
(getMainOutput libgdiplus)
6870
lua
6971
mono'
@@ -89,8 +91,10 @@
8991
strictDeps = true;
9092
nativeBuildInputs = lib.optional finalAttrs.doCheck finalAttrs.mono
9193
++ lib.optional finalAttrs.isLocalBuild git;
94+
gtk2-x11 = getMainOutput gtk2-x11;
9295
buildInputs = genDepsHostTargetFor {
9396
inherit hawkSourceInfo;
97+
gtk2-x11' = finalAttrs.gtk2-x11;
9498
mono' = finalAttrs.mono;
9599
};
96100
patches = lib.optional (!hawkSourceInfo.hasMiscTypeCheckerPatch_6afb3be98) (fetchpatch {

default.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ in {
3838
, git ? pkgs.gitMinimal # only when building from-CWD (`-local`)
3939
# rundeps
4040
, coreutils ? pkgs.coreutils
41+
, gtk2-x11 ? pkgs.gtk2-x11
4142
, kate ? pkgs.kate.overrideAttrs (oldAttrs: {
4243
patches = (oldAttrs.patches or []) ++ [ (fetchpatch {
4344
url = "https://invent.kde.org/utilities/kate/-/commit/9ddf4f0c9eb3c26a0ab33c862d2b161bcbdc6a6e.patch"; # Fix name of OmniSharp LSP binary
@@ -110,7 +111,7 @@ in {
110111
buildDotnetModule fetchpatch fetchzip hardLinkJoin launchScriptsFor makeDesktopItem
111112
releaseTagSourceInfos runCommand symlinkJoin writeShellScriptBin
112113
git
113-
libgdiplus libGL lua openal SDL2 udev zstd
114+
gtk2-x11 libgdiplus libGL lua openal SDL2 udev zstd
114115
buildConfig doCheck extraDefines extraDotnetBuildFlags;
115116
mono = if mono != null
116117
then mono # allow older Mono if set explicitly

0 commit comments

Comments
 (0)