Commit 418a98dc authored by Ben Gamari's avatar Ben Gamari 🐢

Try something

parent b3bf1f8c
......@@ -53,9 +53,14 @@ generateOverride prefix patchDir (patchExtless, patchTypes) = do
pid <- maybe (fail ("invalid patch file name: " ++ show patchExtless)) return pid'
let pname = display (packageName pid)
version = versionNumbers (packageVersion pid)
versionStr = intercalate "." (map show version)
str x = "\""++x++"\""
--baseDrv = "super."++pname
baseDrv = "(super.callHackage \""++pname++"\" \""++intercalate "." (map show version)++"\" {})"
return . (packageName pid,) . (version,) $
--baseDrv = "(super.callHackage "++str pname++" "++str versionStr++" {})"
baseDrv =
let src = "fetchHackageTarball "++str pname++" "++str versionStr++" {})"
in "(super."++pname++".overrideAttrs (oldAttrs: { src="++str src++"; version="++str versionStr++"; }))"
return . (packageName pid,) . (version,) $
"haskell.lib.doJailbreak (dontRevise "
++ foldl' (override prefix patchDir patchExtless) baseDrv patchTypes ++ ")"
......@@ -90,6 +95,7 @@ main = do
putStrLn "{haskell}:"
putStrLn "let dontRevise = pkg: haskell.lib.overrideCabal pkg (old: { editedCabalFile = null; }); in"
putStrLn "let setCabalFile = pkg: file: haskell.lib.overrideCabal pkg (old: { postPatch = ''cp ${file} ${old.pname}.cabal''; }); in"
putStrLn "let fetchHackageTarball = pname: version: let component = haskellPackages.all-cabal-hashes-component pname version; v
putStrLn "self: super: {\n"
putStrLn overrides
putStrLn "}"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment