git.iko.soy/typeable/cabal2nix
on master help sign in
Hackage4Nix.hs: drop the notion of a "patched package"

That list was empty all the time anyway.

commitc83c8ab7332967fb259d2911531cc3e196322eb9 authorPeter Simons <simons@cryp.to> dateFri 12 Apr 2013, 22:01 (14 years ago) parent3f2cdac
2 files changed+11−27
README.md+10−19 src/Hackage4Nix.hs+1−8
README.md+10−19
@@ -108,32 +108,23 @@ performing updates!
108108
109109## Current State of Affairs
110110
111−The tool-chain is stable. As of today, 2011-08-30, almost all Haskell
111+The tool-chain is stable. As of today, 2013-04-12, virtually all Haskell
112112packages available in Nix have been generated automatically from their
113−Cabal files. The exceptions are:
114−
115−* "Bad packages" that cannot be generated automatically because there
116− is no proper Cabal file for them, or because their builds are so
117− complicated that the `cabal.nix` build doesn't suffice to do the
118− trick. The list of bad packages is hard-coded into
119− [`hackage4nix.hs`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs),
120− in the functions `badPackagePaths` and `patchedPackages`. Any
121− package list in there is going to be ignored by `hackage4nix`.
122−
123−* "Patched packages" cannot be generated automatically, because their
124− build instructions need patches that `cabal2nix` doesn't (yet) know
125− about. There is a hard-coded list of patched packages in
126− [`hackage4nix`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs).
127− Furthermore, all build expressions that define any of the attributes
113+Cabal files. There are only a handful of exceptions, which we cannot
114+generate because these packages aren't available on Hackage. The list of
115+those packages is hard-coded into the
116+[`hackage4nix.hs`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs)
117+binary in the function `badPackagePaths`.
118+
119+Furthermore, Hackage4Nix will not re-generate packages that have been
120+patched, i.e. that define any of the following attributes:
128121
129122 (pre|post)Configure
130123 (pre|post)Install
131124 patchPhase
132125 patches
133126
134− are considered "patched". That list of attributes is hard-coded in
135− [`hackage4nix.hs`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs)
136− in the function `regenerateDerivation`.
127+These packages are considered for updates, however.
137128
138129The complete list of Haskell packages available in Nix is generated by
139130the tool [`package-list`](http://github.com/peti/package-list),
src/Hackage4Nix.hs+1−8
@@ -71,8 +71,7 @@ discoverNixFiles yield dirOrFile = do
7171 (False,_) -> io (readDirectory dirOrFile) >>= mapM_ (discoverNixFiles yield . (dirOrFile </>))
7272
7373regenerateDerivation :: Derivation -> String -> Bool
74−regenerateDerivation deriv buf = (pname deriv `notElem` patchedPackages) &&
75− not (buf =~ "(pre|post)Configure|(pre|post)Install|patchPhase|patches")
74+regenerateDerivation deriv buf = not (buf =~ "(pre|post)Configure|(pre|post)Install|patchPhase|patches")
7675
7776parseNixFile :: FilePath -> String -> Hackage4Nix (Maybe Pkg)
7877parseNixFile path buf
@@ -208,9 +207,3 @@ badPackagePaths = [ "haskell-platform/2009.2.0.2.nix", "haskell-platform/2010.1.
208207 , "haskell-platform/2012.2.0.0.nix", "haskell-platform/2012.4.0.0.nix"
209208 , "top-level/all-packages.nix", "top-level/haskell-packages.nix"
210209 ]
211−
212−-- Packages that we cannot regenerate automatically yet. This list
213−-- should be empty.
214−
215−patchedPackages :: [String]
216−patchedPackages = []