on iko/ghcjs-patch-master help sign in
Fix `subdir: .` in `source-repository-package` (#799)
commit2162bea8853f46fbd9138cf84ee663a6624cad8f authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateTue 4 Aug 2020, 15:09 (6 years ago) parentc657c16
1 file changed+3−4
lib/cabal-project-parser.nix+3−4
lib/cabal-project-parser.nix+3−4
@@ -66,11 +66,10 @@ let
6666 in __trace "WARNING: No sha256 found for source-repository-package ${repo.location} ${repo.tag} download may fail in restricted mode (hydra)"
6767 (__trace "Consider adding `--sha256: ${hashPath drv}` to the ${cabalProjectFileName} file or passing in a lookupSha256 argument"
6868 drv)
69− ) + subdir)
69+ ) + (if subdir == "." then "" else "/" + subdir))
7070 (if repo ? subdir
71− then builtins.map (x: "/" + x) (
72− pkgs.lib.filter (x: x != "") (pkgs.lib.splitString " " repo.subdir))
73− else [""]);
71+ then pkgs.lib.filter (x: x != "") (pkgs.lib.splitString " " repo.subdir)
72+ else ["."]);
7473
7574 # Parse a source-repository-package and fetch it if has `type: git`
7675 parseBlock = cabalProjectFileName: lookupSha256: block: