From df8b8d48087d03280f020d0cd082a6f5b2c9bffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sun, 8 Oct 2023 10:01:37 +0200 Subject: [PATCH] uiua: add passthru.tests.run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- pkgs/by-name/ui/uiua/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/ui/uiua/package.nix b/pkgs/by-name/ui/uiua/package.nix index 5349c1f53108..e4c8fb1c0486 100644 --- a/pkgs/by-name/ui/uiua/package.nix +++ b/pkgs/by-name/ui/uiua/package.nix @@ -6,6 +6,10 @@ , audioSupport ? true , darwin , alsa-lib + +# passthru.tests.run +, runCommand +, uiua }: rustPlatform.buildRustPackage rec { @@ -37,6 +41,12 @@ rustPlatform.buildRustPackage rec { buildFeatures = lib.optional audioSupport "audio"; + passthru.tests.run = runCommand "uiua-test-run" {nativeBuildInputs = [uiua];} '' + uiua init; + diff -U3 --color=auto <(uiua run main.ua) <(echo '"Hello, World!"') + touch $out; + ''; + meta = with lib; { description = "A stack-oriented array programming language with a focus on simplicity, beauty, and tacit code"; longDescription = ''