on iko/ghcjs-patch-master help sign in
Fix `subdir: .` in `source-repository-package` (#799)
2162beaHamish Mackenzie
lib/cabal-project-parser.nix+3−4
@@ -66,11 +66,10 @@ let
66 in __trace "WARNING: No sha256 found for source-repository-package ${repo.location} ${repo.tag} download may fail in restricted mode (hydra)"
66 in __trace "WARNING: No sha256 found for source-repository-package ${repo.location} ${repo.tag} download may fail in restricted mode (hydra)"
67 (__trace "Consider adding `--sha256: ${hashPath drv}` to the ${cabalProjectFileName} file or passing in a lookupSha256 argument"
67 (__trace "Consider adding `--sha256: ${hashPath drv}` to the ${cabalProjectFileName} file or passing in a lookupSha256 argument"
68 drv)
68 drv)
69− ) + subdir)
69+ ) + (if subdir == "." then "" else "/" + subdir))
70 (if repo ? subdir
70 (if repo ? subdir
71− then builtins.map (x: "/" + x) (
72− pkgs.lib.filter (x: x != "") (pkgs.lib.splitString " " repo.subdir))
71+ then pkgs.lib.filter (x: x != "") (pkgs.lib.splitString " " repo.subdir)
73− else [""]);
72+ else ["."]);
74
73
75 # Parse a source-repository-package and fetch it if has `type: git`
74 # Parse a source-repository-package and fetch it if has `type: git`
76 parseBlock = cabalProjectFileName: lookupSha256: block:
75 parseBlock = cabalProjectFileName: lookupSha256: block: