Skip to content

Commit 505130b

Browse files
authored
Use the source sub directory when running tests (#1005)
1 parent 0c3689b commit 505130b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/check.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ in stdenv.mkDerivation ({
2828
# component and we want it to quietly succeed.
2929
buildPhase = ''
3030
mkdir $out
31+
${
32+
# Change to the source sub directory if there is one.
33+
lib.optionalString (drv.srcSubDir or "" != "") ''
34+
cd ${lib.removePrefix "/" drv.srcSubDir}
35+
''
36+
}
3137
3238
runHook preCheck
3339

0 commit comments

Comments
 (0)