File tree Expand file tree Collapse file tree 3 files changed +31
-4
lines changed Expand file tree Collapse file tree 3 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 66 rustPlatform ,
77 fetchFromGitHub ,
88 pkg-config ,
9+ versionCheckHook ,
910
1011 libffi ,
1112 audioSupport ? true ,
1213 alsa-lib ,
1314 webcamSupport ? false ,
15+ libGL ,
16+ libxkbcommon ,
17+ wayland ,
18+ xorg ,
19+ windowSupport ? false ,
1420
1521 runCommand ,
1622} :
@@ -34,7 +40,7 @@ lib.fix (
3440 src = fetchFromGitHub {
3541 owner = "uiua-lang" ;
3642 repo = "uiua" ;
37- inherit ( versionInfo ) rev hash ;
43+ inherit ( versionInfo ) tag hash ;
3844 } ;
3945
4046 nativeBuildInputs =
@@ -48,7 +54,28 @@ lib.fix (
4854 buildFeatures =
4955 [ "libffi/system" ] # force libffi to be linked dynamically instead of rebuilding it
5056 ++ lib . optional audioSupport "audio"
51- ++ 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+ '' ;
75+
76+ nativeInstallCheckInputs = [ versionCheckHook ] ;
77+ versionCheckProgramArg = "--version" ;
78+ doInstallCheck = true ;
5279
5380 passthru . updateScript = versionInfo . updateScript ;
5481 passthru . tests . run = runCommand "uiua-test-run" { nativeBuildInputs = [ uiua ] ; } ''
Original file line number Diff line number Diff line change 11rec {
22 version = "0.14.1" ;
3- rev = version ;
3+ tag = version ;
44 hash = "sha256-+FiJYxB2Lb1B7l9QEuB/XzdEYgJZmYAQpKimRIhWwhc=" ;
55 cargoHash = "sha256-0ZK87aX3akEPEXIsFrbOvTfhW24TZCuCcSVp+j8ylyg=" ;
66 updateScript = ./update-stable.sh ;
Original file line number Diff line number Diff line change 11rec {
22 version = "0.14.1" ;
3- rev = version ;
3+ tag = version ;
44 hash = "sha256-+FiJYxB2Lb1B7l9QEuB/XzdEYgJZmYAQpKimRIhWwhc=" ;
55 cargoHash = "sha256-0ZK87aX3akEPEXIsFrbOvTfhW24TZCuCcSVp+j8ylyg=" ;
66 updateScript = ./update-unstable.sh ;
You can’t perform that action at this time.
0 commit comments