Commit b3bf1f8c authored by Ben Gamari's avatar Ben Gamari 🐢

nix: Base overridden packages on correct package versions

Previously we would use whatever version was in nixpkgs yet this may not
be the version which the patch is supposed to be applied against.
parent 4b38c9cc
......@@ -53,9 +53,11 @@ 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)
--baseDrv = "super."++pname
baseDrv = "(super.callHackage \""++pname++"\" \""++intercalate "." (map show version)++"\" {})"
return . (packageName pid,) . (version,) $
"haskell.lib.doJailbreak (dontRevise "
++ foldl' (override prefix patchDir patchExtless) ("super."++pname) patchTypes ++ ")"
++ foldl' (override prefix patchDir patchExtless) baseDrv patchTypes ++ ")"
patchFunction :: PatchType -> String
patchFunction = \case
......
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