From 8c3258c180319ee96341e17fc08ef966686abe1c Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sat, 7 Dec 2024 22:49:48 +0100 Subject: [PATCH 1/2] uiua: remove legacy darwin deps --- pkgs/by-name/ui/uiua/package.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkgs/by-name/ui/uiua/package.nix b/pkgs/by-name/ui/uiua/package.nix index 9c3de766bcffc..95ab379820f3d 100644 --- a/pkgs/by-name/ui/uiua/package.nix +++ b/pkgs/by-name/ui/uiua/package.nix @@ -5,7 +5,6 @@ fetchFromGitHub, pkg-config, - darwin, audioSupport ? true, alsa-lib, webcamSupport ? false, @@ -15,9 +14,6 @@ uiua, }: -let - inherit (darwin.apple_sdk.frameworks) AppKit AudioUnit CoreServices; -in rustPlatform.buildRustPackage rec { pname = "uiua"; version = "0.13.0"; @@ -35,13 +31,7 @@ rustPlatform.buildRustPackage rec { lib.optionals (webcamSupport || stdenv.hostPlatform.isDarwin) [ rustPlatform.bindgenHook ] ++ lib.optionals audioSupport [ pkg-config ]; - buildInputs = - lib.optionals stdenv.hostPlatform.isDarwin [ - AppKit - CoreServices - ] - ++ lib.optionals (audioSupport && stdenv.hostPlatform.isDarwin) [ AudioUnit ] - ++ lib.optionals (audioSupport && stdenv.hostPlatform.isLinux) [ alsa-lib ]; + buildInputs = lib.optionals (audioSupport && stdenv.hostPlatform.isLinux) [ alsa-lib ]; buildFeatures = lib.optional audioSupport "audio" ++ lib.optional webcamSupport "webcam"; From 3c1facf9a7a38bd5b3b1c2325a7da4bc47797a2d Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sat, 7 Dec 2024 23:08:15 +0100 Subject: [PATCH 2/2] uiua-unstable: init at 0.14.0-dev.6 --- pkgs/by-name/ui/uiua/package.nix | 14 ++++++++------ pkgs/by-name/ui/uiua/stable.nix | 7 +++++++ pkgs/by-name/ui/uiua/unstable.nix | 7 +++++++ .../ui/uiua/{update.sh => update-stable.sh} | 2 +- pkgs/by-name/ui/uiua/update-unstable.sh | 4 ++++ pkgs/top-level/all-packages.nix | 2 ++ 6 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 pkgs/by-name/ui/uiua/stable.nix create mode 100644 pkgs/by-name/ui/uiua/unstable.nix rename pkgs/by-name/ui/uiua/{update.sh => update-stable.sh} (72%) create mode 100755 pkgs/by-name/ui/uiua/update-unstable.sh diff --git a/pkgs/by-name/ui/uiua/package.nix b/pkgs/by-name/ui/uiua/package.nix index 95ab379820f3d..f132fcaf76d62 100644 --- a/pkgs/by-name/ui/uiua/package.nix +++ b/pkgs/by-name/ui/uiua/package.nix @@ -12,21 +12,23 @@ # passthru.tests.run runCommand, uiua, + + unstable ? false, }: +let + versionInfo = import (if unstable then ./unstable.nix else ./stable.nix); +in rustPlatform.buildRustPackage rec { pname = "uiua"; - version = "0.13.0"; + inherit (versionInfo) version cargoHash; src = fetchFromGitHub { owner = "uiua-lang"; repo = "uiua"; - rev = version; - hash = "sha256-5IqJ/lvozXzc7LRUzxpG04M3Nir+3h+GoL7dqTgC9J8="; + inherit (versionInfo) rev hash; }; - cargoHash = "sha256-0hbE2ZH7daw/VQLe51CxOIborABDF0x00kTyx9NCs9g="; - nativeBuildInputs = lib.optionals (webcamSupport || stdenv.hostPlatform.isDarwin) [ rustPlatform.bindgenHook ] ++ lib.optionals audioSupport [ pkg-config ]; @@ -35,7 +37,7 @@ rustPlatform.buildRustPackage rec { buildFeatures = lib.optional audioSupport "audio" ++ lib.optional webcamSupport "webcam"; - passthru.updateScript = ./update.sh; + passthru.updateScript = versionInfo.updateScript; passthru.tests.run = runCommand "uiua-test-run" { nativeBuildInputs = [ uiua ]; } '' uiua init diff -U3 --color=auto <(uiua run main.ua) <(echo '"Hello, World!"') diff --git a/pkgs/by-name/ui/uiua/stable.nix b/pkgs/by-name/ui/uiua/stable.nix new file mode 100644 index 0000000000000..22d8aabbf246c --- /dev/null +++ b/pkgs/by-name/ui/uiua/stable.nix @@ -0,0 +1,7 @@ +rec { + version = "0.13.0"; + rev = version; + hash = "sha256-5IqJ/lvozXzc7LRUzxpG04M3Nir+3h+GoL7dqTgC9J8="; + cargoHash = "sha256-0hbE2ZH7daw/VQLe51CxOIborABDF0x00kTyx9NCs9g="; + updateScript = ./update-stable.sh; +} diff --git a/pkgs/by-name/ui/uiua/unstable.nix b/pkgs/by-name/ui/uiua/unstable.nix new file mode 100644 index 0000000000000..88af157faf72d --- /dev/null +++ b/pkgs/by-name/ui/uiua/unstable.nix @@ -0,0 +1,7 @@ +rec { + version = "0.14.0-dev.6"; + rev = version; + hash = "sha256-YRv4i014xD4d8YN5PuMsa06+7kZgISPBGkKrVLU5ZN0="; + cargoHash = "sha256-GYBHaYGmKcV0Gw1I4IWzfmecHwQtb2ys5bMguqfo8S0="; + updateScript = ./update-unstable.sh; +} diff --git a/pkgs/by-name/ui/uiua/update.sh b/pkgs/by-name/ui/uiua/update-stable.sh similarity index 72% rename from pkgs/by-name/ui/uiua/update.sh rename to pkgs/by-name/ui/uiua/update-stable.sh index 389ba4867198e..18b29eaa78112 100755 --- a/pkgs/by-name/ui/uiua/update.sh +++ b/pkgs/by-name/ui/uiua/update-stable.sh @@ -1,7 +1,7 @@ #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl jq nix-update common-updater-scripts -nix-update uiua +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 diff --git a/pkgs/by-name/ui/uiua/update-unstable.sh b/pkgs/by-name/ui/uiua/update-unstable.sh new file mode 100755 index 0000000000000..ed64ae215c643 --- /dev/null +++ b/pkgs/by-name/ui/uiua/update-unstable.sh @@ -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 uiua-unstable diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b354419c57a3b..dd47d2873e2e8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7109,6 +7109,8 @@ with pkgs; babashka-unwrapped = callPackage ../development/interpreters/babashka { }; babashka = callPackage ../development/interpreters/babashka/wrapped.nix { }; + uiua-unstable = callPackage ../by-name/ui/uiua/package.nix { unstable = true; }; + # BQN interpreters and compilers mbqn = bqn;