Skip to content

Commit

Permalink
uiua: use finalAttrs
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaSajt committed Nov 16, 2024
1 parent bd82ec8 commit 16d8715
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions pkgs/by-name/ui/uiua/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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=";
};

Expand All @@ -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
Expand All @@ -69,4 +70,4 @@ rustPlatform.buildRustPackage rec {
defelo
];
};
}
})

0 comments on commit 16d8715

Please sign in to comment.