ukmm: fix running on x11
Also switches from using LD_LIBRARY_PATH to RUSTFLAGS to include required runtime libraries.
This commit is contained in:
parent
c0a7daff96
commit
f88960c7b6
@ -5,6 +5,7 @@
|
||||
, pkg-config
|
||||
, wrapGAppsHook3
|
||||
, libglvnd
|
||||
, libxkbcommon
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
@ -35,9 +36,21 @@ rustPlatform.buildRustPackage rec {
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libglvnd ]})
|
||||
'';
|
||||
buildInputs = [
|
||||
libglvnd
|
||||
libxkbcommon
|
||||
];
|
||||
|
||||
# Force linking to libEGL, which is always dlopen()ed, and to
|
||||
# libwayland-client & libxkbcommon, which is dlopen()ed based on the
|
||||
# winit backend.
|
||||
RUSTFLAGS = map (a: "-C link-arg=${a}") [
|
||||
"-Wl,--push-state,--no-as-needed"
|
||||
"-lEGL"
|
||||
"-lwayland-client"
|
||||
"-lxkbcommon"
|
||||
"-Wl,--pop-state"
|
||||
];
|
||||
|
||||
cargoTestFlags = [
|
||||
"--all"
|
||||
|
Loading…
Reference in New Issue
Block a user