- when (isJust $ library pd) $
- writeInstalledConfig distdir pd lbi True
- (distdir </> "inplace-pkg-config")
+ case (library pd, libraryConfig lbi) of
+ (Nothing, Nothing) -> return ()
+ (Just lib, Just clbi) -> do
+ cwd <- getCurrentDirectory
+ let installedPkgInfo = inplaceInstalledPackageInfo cwd distdir
+ pd lib lbi clbi
+ content = Installed.showInstalledPackageInfo installedPkgInfo ++ "\n"
+ writeFileAtomic (distdir </> "inplace-pkg-config") content
+ _ -> error "Inconsistent lib components; can't happen?"