diff --git a/pkgs/by-name/de/deno/package.nix b/pkgs/by-name/de/deno/package.nix index bcc620b3d62d..1c382f5a9d9e 100644 --- a/pkgs/by-name/de/deno/package.nix +++ b/pkgs/by-name/de/deno/package.nix @@ -14,7 +14,6 @@ sqlite, lld, writableTmpDirAsHomeHook, - fetchpatch, # Test deps curl, @@ -22,6 +21,9 @@ git, python3, esbuild, + + # self for passthru + deno, }: let @@ -90,13 +92,14 @@ rustPlatform.buildRustPackage (finalAttrs: { # To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE env.RUSTY_V8_ARCHIVE = librusty_v8; - # Many tests depend on prebuilt binaries being present at `./third_party/prebuilt`. - # We provide nixpkgs binaries for these for all platforms, but the test runner itself only handles - # these four arch+platform combinations. - doCheck = - stdenv.hostPlatform.isDarwin - || (stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isx86_64)); - + # Don't run checks on hydra as they've been observed to be flakey for us and + # other distros CI: https://gitlab.alpinelinux.org/alpine/aports/-/blob/bec8b026686323b496365b825ad14fdf4473adf2/community/deno/APKBUILD#L79 + # We haven't reproduced it on local machines, could be related to doing other + # builds simultaneously. + # A build with tests (+ librusty_v8 tests) is included in `deno.passhtru.tests` + doCheck = false; + # check related config is left in the main package so if someone uses + # `overrideAttrs` to always build with tests, it'll all work. preCheck = # Provide esbuild binary at `./third_party/prebuilt/` just like upstream: # https://github.com/denoland/deno_third_party/tree/master/prebuilt @@ -243,7 +246,20 @@ rustPlatform.buildRustPackage (finalAttrs: { passthru = { updateScript = ./update.sh; - tests = callPackage ./tests { }; + tests = (callPackage ./tests { }) // { + build-with-unit-tests = deno.overrideAttrs (fa: { + # The tools test suite requires building the test server + dontBuild = false; + # Many tests depend on prebuilt binaries being present at `./third_party/prebuilt`. + # We provide nixpkgs binaries for these for all platforms, but the test runner itself only handles + # these four arch+platform combinations. + doCheck = + stdenv.hostPlatform.isDarwin + || (stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isx86_64)); + }); + # Also include librusty_v8 tests + librusty_v8-tests = librusty_v8.passthru.tests; + }; inherit librusty_v8; }; diff --git a/pkgs/by-name/de/deno/rusty-v8/default.nix b/pkgs/by-name/de/deno/rusty-v8/default.nix index 725ecebed0b3..2db5c12778ed 100644 --- a/pkgs/by-name/de/deno/rusty-v8/default.nix +++ b/pkgs/by-name/de/deno/rusty-v8/default.nix @@ -153,6 +153,14 @@ rustPlatform.buildRustPackage (finalAttrs: { "fortify3" ]; + # Don't run checks on hydra as they've been observed to be flakey for us and + # other distros CI: https://gitlab.alpinelinux.org/alpine/aports/-/blob/bec8b026686323b496365b825ad14fdf4473adf2/community/deno/APKBUILD#L79 + # We haven't reproduced it on local machines, could be related to doing other + # builds simultaneously. + # A build with tests is included as part of `deno.passhtru.tests` via `librusty_v8.passthru.tests` + doCheck = false; + # Check related config is left in the main package so if someone uses + # `overrideAttrs` to always build with tests, it'll all work. checkFlags = [ # These tests probably fail due to a more recent rustc version (upstream: 1.89.0, here: 1.93.0) "--skip=ui" @@ -167,6 +175,14 @@ rustPlatform.buildRustPackage (finalAttrs: { runHook postInstall ''; + passthru = { + tests = { + build-with-unit-tests = deno.passthru.librusty_v8.overrideAttrs (fa: { + doCheck = true; + }); + }; + }; + requiredSystemFeatures = [ "big-parallel" ]; meta = {