on iko/ghcjs-patch-master help sign in
Fix source dirs with trailing slash (#445) (#446)
e1b5749Hamish Mackenzie
lib/clean-cabal-component.nix+5−1
@@ -14,7 +14,11 @@ let
14 # Like normalizeRelativePath but with a trailing / when needed
14 # Like normalizeRelativePath but with a trailing / when needed
15 normalizeRelativeDir = dir:
15 normalizeRelativeDir = dir:
16 let p = normalizeRelativePath dir;
16 let p = normalizeRelativePath dir;
17+ in if p == "" || p == "/"
18+ then ""
19+ else if lib.hasSuffix "/" p
20+ then p
17− in if p == "" then "" else p + "/";
21+ else p + "/";
18in
22in
19 if srcStr' == null || package.detailLevel != "FullDetails"
23 if srcStr' == null || package.detailLevel != "FullDetails"
20 then src
24 then src