diff --git a/lib/check.nix b/lib/check.nix index 2fa2f41ebe..0bf44822f7 100644 --- a/lib/check.nix +++ b/lib/check.nix @@ -28,6 +28,12 @@ in stdenv.mkDerivation ({ # component and we want it to quietly succeed. buildPhase = '' mkdir $out + ${ + # Change to the source sub directory if there is one. + lib.optionalString (drv.srcSubDir or "" != "") '' + cd ${lib.removePrefix "/" drv.srcSubDir} + '' + } runHook preCheck