Skip to content

Commit

Permalink
Nix expr: Add gtk2-x11 (libgtk-x11-2.0.so.0) to buildInputs
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz committed Sep 21, 2024
1 parent 8bfe963 commit 9a2c163
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 8 additions & 1 deletion Dist/launch-scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion Dist/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# makedeps
, git
# rundeps
, gtk2-x11
, libgdiplus
, libGL
, lua
Expand Down Expand Up @@ -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'
Expand All @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9a2c163

Please sign in to comment.