From 16d8715b9bdb8e0992e6b146696d128f66b4b2bc Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Fri, 15 Nov 2024 02:15:20 +0100 Subject: [PATCH] uiua: use finalAttrs --- pkgs/by-name/ui/uiua/package.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/ui/uiua/package.nix b/pkgs/by-name/ui/uiua/package.nix index 9c3de766bcffcc..b49ca644fdcd12 100644 --- a/pkgs/by-name/ui/uiua/package.nix +++ b/pkgs/by-name/ui/uiua/package.nix @@ -12,20 +12,19 @@ # passthru.tests.run runCommand, - uiua, }: let inherit (darwin.apple_sdk.frameworks) AppKit AudioUnit CoreServices; in -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "uiua"; version = "0.13.0"; src = fetchFromGitHub { owner = "uiua-lang"; repo = "uiua"; - rev = version; + rev = finalAttrs.version; hash = "sha256-5IqJ/lvozXzc7LRUzxpG04M3Nir+3h+GoL7dqTgC9J8="; }; @@ -46,14 +45,16 @@ rustPlatform.buildRustPackage rec { buildFeatures = lib.optional audioSupport "audio" ++ lib.optional webcamSupport "webcam"; passthru.updateScript = ./update.sh; - passthru.tests.run = runCommand "uiua-test-run" { nativeBuildInputs = [ uiua ]; } '' - uiua init - diff -U3 --color=auto <(uiua run main.ua) <(echo '"Hello, World!"') - touch $out - ''; + passthru.tests.run = + runCommand "uiua-test-run" { nativeBuildInputs = [ finalAttrs.finalPackage ]; } + '' + uiua init + diff -U3 --color=auto <(uiua run main.ua) <(echo '"Hello, World!"') + touch $out + ''; meta = { - changelog = "https://github.com/uiua-lang/uiua/blob/${src.rev}/changelog.md"; + 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 @@ -69,4 +70,4 @@ rustPlatform.buildRustPackage rec { defelo ]; }; -} +})