Skip to content
Snippets Groups Projects
Commit b3bf1f8c authored by Ben Gamari's avatar Ben Gamari :turtle:
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment