Skip to content

Commit e75958d

Browse files
committed
uiua{,-unstable}: add windowSupport option
1 parent 0d95bdb commit e75958d

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

pkgs/by-name/ui/uiua/package.nix

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
audioSupport ? true,
1313
alsa-lib,
1414
webcamSupport ? false,
15+
libGL,
16+
libxkbcommon,
17+
wayland,
18+
xorg,
19+
windowSupport ? false,
1520

1621
runCommand,
1722
}:
@@ -49,7 +54,24 @@ lib.fix (
4954
buildFeatures =
5055
[ "libffi/system" ] # force libffi to be linked dynamically instead of rebuilding it
5156
++ lib.optional audioSupport "audio"
52-
++ lib.optional webcamSupport "webcam";
57+
++ lib.optional webcamSupport "webcam"
58+
++ lib.optional windowSupport "window";
59+
60+
postFixup =
61+
let
62+
runtimeDependencies = lib.optionals windowSupport [
63+
libGL
64+
libxkbcommon
65+
wayland
66+
xorg.libX11
67+
xorg.libXcursor
68+
xorg.libXi
69+
xorg.libXrandr
70+
];
71+
in
72+
lib.optionalString (runtimeDependencies != [ ] && stdenv.hostPlatform.isLinux) ''
73+
patchelf --add-rpath ${lib.makeLibraryPath runtimeDependencies} $out/bin/uiua
74+
'';
5375

5476
nativeInstallCheckInputs = [ versionCheckHook ];
5577
versionCheckProgramArg = "--version";

0 commit comments

Comments
 (0)