diff options
-rw-r--r-- | pkgs/development/interpreters/bqn/cbqn/default.nix | 24 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
2 files changed, 24 insertions, 6 deletions
diff --git a/pkgs/development/interpreters/bqn/cbqn/default.nix b/pkgs/development/interpreters/bqn/cbqn/default.nix index a6e8f4c9feb..f455be74312 100644 --- a/pkgs/development/interpreters/bqn/cbqn/default.nix +++ b/pkgs/development/interpreters/bqn/cbqn/default.nix @@ -6,7 +6,7 @@ , fixDarwinDylibNames , genBytecode ? false , bqn-path ? null -, mbqn-source ? null +, mbqn-source , enableReplxx ? false , enableSingeli ? stdenv.hostPlatform.avx2Support , enableLibcbqn ? ((stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) && !enableReplxx) @@ -42,6 +42,7 @@ stdenv.mkDerivation rec { ]; dontConfigure = true; + doInstallCheck = true; postPatch = '' sed -i '/SHELL =.*/ d' makefile @@ -100,6 +101,26 @@ stdenv.mkDerivation rec { runHook postInstall ''; + installCheckPhase = '' + runHook preInstallCheck + + # main test suite from mlochbaum/BQN + $out/bin/BQN ${mbqn-source}/test/this.bqn + + # CBQN tests that do not require compiling with test-only flags + $out/bin/BQN test/cmp.bqn + $out/bin/BQN test/equal.bqn + $out/bin/BQN test/copy.bqn + $out/bin/BQN test/bit.bqn + $out/bin/BQN test/hash.bqn + $out/bin/BQN test/squeezeValid.bqn + $out/bin/BQN test/squeezeExact.bqn + $out/bin/BQN test/various.bqn + $out/bin/BQN test/random.bqn + + runHook postInstallCheck + ''; + meta = with lib; { homepage = "https://github.com/dzaima/CBQN/"; description = "BQN implementation in C"; @@ -108,4 +129,3 @@ stdenv.mkDerivation rec { platforms = platforms.all; }; } -# TODO: test suite diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c6bf4993f8a..4ae59f66e73 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16761,17 +16761,15 @@ with pkgs; mbqn-source = buildPackages.mbqn.src; phase0 = callPackage ../development/interpreters/bqn/cbqn { - inherit (cbqn-bootstrap) stdenv; + inherit (cbqn-bootstrap) mbqn-source stdenv; genBytecode = false; bqn-path = null; - mbqn-source = null; }; phase0-replxx = callPackage ../development/interpreters/bqn/cbqn { - inherit (cbqn-bootstrap) stdenv; + inherit (cbqn-bootstrap) mbqn-source stdenv; genBytecode = false; bqn-path = null; - mbqn-source = null; enableReplxx = true; }; |