From bd8622f9b245774e581b1385a21333d9a1d5ea57 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 6 Jun 2025 14:50:10 +0200 Subject: [PATCH] overlays.withoutChecks --- overlays.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/overlays.nix b/overlays.nix index b9556a4..85e913c 100755 --- a/overlays.nix +++ b/overlays.nix @@ -82,6 +82,30 @@ let } ); + # usage: nix-build . -A .withoutChecks + overlays.withoutChecks = mkDerivationOverlay ( + final: prev: prevStdenv: finalAttrs: prevAttrs: { + passthru = { + withoutChecks = prevStdenv.mkDerivation ( + prevAttrs + // { + doCheck = false; + doInstallCheck = false; + # stub phases and inputs to reduce closure, in case the builder doesn't do this correctly + checkInputs = []; + nativeCheckInputs = []; + preCheck = ":"; + postCheck = ":"; + checkPhase = ":"; + preInstallCheck = ":"; + postInstallCheck = ":"; + installCheckPhase = ":"; + } + ); + } // prevAttrs.passthru or { }; + } + ); + # usage: nix-build . -A .srcOnly overlays.srcOnly = mkDerivationOverlay ( final: prev: prevStdenv: finalAttrs: prevAttrs: { @@ -536,6 +560,7 @@ let in [ overlays.withDebug + overlays.withoutChecks overlays.srcOnly overlays.withInvalidateFetcherByDrvHash overlays.withUnpacked