Skip to content

Commit ab61574

Browse files
committed
fix(flake): missing libEGL
1 parent 698159e commit ab61574

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

nix/gst-wayland-display.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ pkgs.rustPlatform.buildRustPackage rec {
1111
};
1212
nativeBuildInputs = with pkgs; [ pkg-config cargo-c ];
1313
buildInputs = with pkgs; [
14+
mesa
15+
libglvnd
16+
pipewire
1417
glib
1518
wayland
1619
libinput
@@ -27,6 +30,7 @@ pkgs.rustPlatform.buildRustPackage rec {
2730

2831
udev
2932
];
33+
3034
cargoLockFile =
3135
builtins.toFile "cargo.lock" (builtins.readFile "${src}/Cargo.lock");
3236
cargoLock = {
@@ -36,6 +40,17 @@ pkgs.rustPlatform.buildRustPackage rec {
3640
"smithay-0.3.0" = "sha256-jrBY/r4IuVKiE7ykuxeZcJgikqJo6VoKQlBWrDbpy9Y=";
3741
};
3842
};
43+
44+
# Force linking to libEGL, which is always dlopen()ed, and to
45+
# libwayland-client, which is always dlopen()ed except by the
46+
# obscure winit backend.
47+
RUSTFLAGS = map (a: "-C link-arg=${a}") [
48+
"-Wl,--push-state,--no-as-needed"
49+
"-lEGL"
50+
"-lwayland-client"
51+
"-Wl,--pop-state"
52+
];
53+
3954
postPatch = ''
4055
cp ${cargoLockFile} Cargo.lock
4156
'';

0 commit comments

Comments
 (0)