Nix expr: Add `gtk2-x11` (`libgtk-x11-2.0.so.0`) to `buildInputs`

This commit is contained in:
YoshiRulz 2024-09-22 02:05:27 +10:00
parent 8bfe963bbb
commit 9a2c163461
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
3 changed files with 15 additions and 3 deletions

View File

@ -83,7 +83,14 @@
fi
${if isManualLocalBuild then noAssetManagementScript else assetManagementScript}
ldLibPath="$BIZHAWK_INT_SYSLIB_PATH:${lib.makeLibraryPath bizhawkAssemblies.buildInputs}"
${""/*
here's the breakdown for the GTK theme problem:
problem 1: `Gtk not found (missing LD_LIBRARY_PATH to libgtk-x11-2.0.so.0?), using built-in colorscheme` printed to stderr
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"`
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
export LD_LIBRARY_PATH="$ldLibPath"
else

View File

@ -16,6 +16,7 @@
# makedeps
, git
# rundeps
, gtk2-x11
, libgdiplus
, libGL
, lua
@ -63,7 +64,8 @@
'';
dontFixup = true;
};
genDepsHostTargetFor = { hawkSourceInfo, mono' ? mono }: [
genDepsHostTargetFor = { hawkSourceInfo, gtk2-x11' ? getMainOutput gtk2-x11, mono' ? mono }: [
gtk2-x11'
(getMainOutput libgdiplus)
lua
mono'
@ -89,8 +91,10 @@
strictDeps = true;
nativeBuildInputs = lib.optional finalAttrs.doCheck finalAttrs.mono
++ lib.optional finalAttrs.isLocalBuild git;
gtk2-x11 = getMainOutput gtk2-x11;
buildInputs = genDepsHostTargetFor {
inherit hawkSourceInfo;
gtk2-x11' = finalAttrs.gtk2-x11;
mono' = finalAttrs.mono;
};
patches = lib.optional (!hawkSourceInfo.hasMiscTypeCheckerPatch_6afb3be98) (fetchpatch {

View File

@ -38,6 +38,7 @@ in {
, git ? pkgs.gitMinimal # only when building from-CWD (`-local`)
# rundeps
, coreutils ? pkgs.coreutils
, gtk2-x11 ? pkgs.gtk2-x11
, kate ? pkgs.kate.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or []) ++ [ (fetchpatch {
url = "https://invent.kde.org/utilities/kate/-/commit/9ddf4f0c9eb3c26a0ab33c862d2b161bcbdc6a6e.patch"; # Fix name of OmniSharp LSP binary
@ -110,7 +111,7 @@ in {
buildDotnetModule fetchpatch fetchzip hardLinkJoin launchScriptsFor makeDesktopItem
releaseTagSourceInfos runCommand symlinkJoin writeShellScriptBin
git
libgdiplus libGL lua openal SDL2 udev zstd
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