Fix paths in inplace-pkg-config files
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Fri, 16 Dec 2016 01:27:46 +0000 (01:27 +0000)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Fri, 16 Dec 2016 01:27:46 +0000 (01:27 +0000)
src/Rules/Data.hs

index dc53654..cff0896 100644 (file)
@@ -47,10 +47,8 @@ buildPackageData context@Context {..} = do
                          . replace "rts/dist/build" rtsBuildPath
                          . replace "includes/dist-derivedconstants/header" generatedPath )
                          . lines
-        else do
-            top <- topDirectory
-            let oldPath = top -/- path </> "build"
-            fixFile conf $ unlines . map (replace oldPath path) . lines
+        else
+            fixFile conf $ unlines . map (replace (path </> "build") path) . lines
 
     priority 2.0 $ when (nonCabalContext context) $ dataFile %>
         generatePackageData context