@@ -62,12 +62,15 @@ fetch f = runMaybeT . fetchers where
6262 existsFile <- liftIO $ doesFileExist path
6363 existsDir <- liftIO $ doesDirectoryExist path
6464 guard $ existsDir || existsFile
65− process (DerivationSource "" path "" "", path) <|> localArchive path
65+ let path' | '/' `elem` path = path
66+ | otherwise = "./" ++ path
67+ process (DerivationSource "" path' "" "", path') <|> localArchive path'
6668
6769 localArchive :: FilePath -> MaybeT IO (DerivationSource, a)
6870 localArchive path = do
69− unpacked <- snd <$> fetchWith (False, "zip") (Source ("file://" ++ path) "" Nothing)
70− process (DerivationSource "" path "" "", unpacked)
71+ absolutePath <- liftIO $ canonicalizePath path
72+ unpacked <- snd <$> fetchWith (False, "zip") (Source ("file://" ++ absolutePath) "" Nothing)
73+ process (DerivationSource "" absolutePath "" "", unpacked)
7174
7275 process :: (DerivationSource, FilePath) -> MaybeT IO (DerivationSource, a)
7376 process (derivSource, file) = (,) derivSource <$> f file