Use the source sub directory when running tests (#1005)
commit505130bfdaa9ecff5f50c4c415d4cb7db7089716
authorHamish Mackenzie <Hamish.Mackenzie@iohk.io>
dateTue 19 Jan 2021, 18:28 (6 years ago)
parent0c3689b
lib/check.nix+6
@@ -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