push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
{
uiua_versionType ? "stable",
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
pkg-config,
versionCheckHook,
libffi,
audioSupport ? true,
alsa-lib,
webcamSupport ? false,
libGL,
libxkbcommon,
wayland,
xorg,
windowSupport ? false,
runCommand,
}:
let
versionInfo =
{
"stable" = import ./stable.nix;
"unstable" = import ./unstable.nix;
}
.${uiua_versionType};
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "uiua";
inherit (versionInfo) version cargoHash;
src = fetchFromGitHub {
owner = "uiua-lang";
repo = "uiua";
inherit (versionInfo) tag hash;
};
nativeBuildInputs =
lib.optionals (webcamSupport || stdenv.hostPlatform.isDarwin) [ rustPlatform.bindgenHook ]
++ lib.optionals audioSupport [ pkg-config ];
buildInputs = [
libffi
] # we force dynamic linking our own libffi below
++ lib.optionals (audioSupport && stdenv.hostPlatform.isLinux) [ alsa-lib ];
buildFeatures = [
"libffi/system"
] # force libffi to be linked dynamically instead of rebuilding it
++ lib.optional audioSupport "audio"
++ lib.optional webcamSupport "webcam"
++ lib.optional windowSupport "window";
postFixup =
let
runtimeDependencies = lib.optionals windowSupport [
libGL
libxkbcommon
wayland
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
];
in
lib.optionalString (runtimeDependencies != [ ] && stdenv.hostPlatform.isLinux) ''
patchelf --add-rpath ${lib.makeLibraryPath runtimeDependencies} $out/bin/uiua
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = versionInfo.updateScript;
passthru.tests.run =
runCommand "uiua-test-run" { nativeBuildInputs = [ finalAttrs.finalPackage ]; }
''
uiua init
diff -U3 --color=auto <(uiua run main.ua 2>&1) <(echo '"Hello, World!"')
touch $out
'';
meta = {
changelog = "https://github.com/uiua-lang/uiua/blob/${finalAttrs.src.rev}/changelog.md";
description = "Stack-oriented array programming language with a focus on simplicity, beauty, and tacit code";
longDescription = ''
Uiua combines the stack-oriented and array-oriented paradigms in a single
language. Combining these already terse paradigms results in code with a very
high information density and little syntactic noise.
'';
homepage = "https://www.uiua.org/";
license = lib.licenses.mit;
mainProgram = "uiua";
maintainers = with lib.maintainers; [
cafkafk
tomasajt
defelo
];
};
})

View File

@@ -0,0 +1,7 @@
rec {
version = "0.17.3";
tag = version;
hash = "sha256-TiJAj+wBVb8Z9pnoscF65tB7flbk/XWW+7XrHlvIHeo=";
cargoHash = "sha256-smonKftOpGXy0WxI8Qqr0rTeI/pW6f+G4TxzoaEMsuc=";
updateScript = ./update-stable.sh;
}

View File

@@ -0,0 +1,7 @@
rec {
version = "0.17.3";
tag = version;
hash = "sha256-TiJAj+wBVb8Z9pnoscF65tB7flbk/XWW+7XrHlvIHeo=";
cargoHash = "sha256-smonKftOpGXy0WxI8Qqr0rTeI/pW6f+G4TxzoaEMsuc=";
updateScript = ./update-unstable.sh;
}

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq nix-update common-updater-scripts
nix-update --override-filename pkgs/by-name/ui/uiua/stable.nix --version-regex '^(\d*\.\d*\.\d*)$' uiua
EXT_VER=$(curl https://raw.githubusercontent.com/uiua-lang/uiua-vscode/main/package.json | jq -r .version)
update-source-version vscode-extensions.uiua-lang.uiua-vscode $EXT_VER

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update
nix-update --override-filename pkgs/by-name/ui/uiua/unstable.nix --version unstable --version-regex '^(\d*\.\d*\.\d*.*)$' uiua-unstable