git.iko.soy/typeable/cabal2nix
on master help sign in
Hackage4Nix: don't re-generate expressions that have a "patches" attribute
commit1c5e9b7c4b2d3b78cd4eda8c9c06b814faa73303 authorPeter Simons <simons@cryp.to> dateFri 24 Feb 2012, 13:11 (15 years ago) parentb43981c
3 files changed+5−4
README.md+1 cabal2nix.cabal+3−3 src/Hackage4Nix.hs+1−1
README.md+1
@@ -129,6 +129,7 @@ Cabal files. The exceptions are:
129129 (pre|post)Configure
130130 (pre|post)Install
131131 patchPhase
132+ patches
132133
133134 are considered "patched". That list of attributes is hard-coded in
134135 [`hackage4nix.hs`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs)
cabal2nix.cabal+3−3
@@ -1,5 +1,5 @@
11Name: cabal2nix
2−Version: 1.27
2+Version: 1.28
33Copyright: Peter Simons, Andres Loeh
44License: BSD3
55License-File: LICENSE
@@ -31,8 +31,8 @@ Description:
3131 .
3232 The only required argument is the path to the cabal file. For example:
3333 .
34− > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.27/cabal2nix.cabal
35− > cabal2nix cabal://cabal2nix-1.27
34+ > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.28/cabal2nix.cabal
35+ > cabal2nix cabal://cabal2nix-1.28
3636 .
3737 If the @--sha256@ option has not been specified, cabal2nix calls
3838 @nix-prefetch-url@ to determine the hash automatically. This causes
src/Hackage4Nix.hs+1−1
@@ -73,7 +73,7 @@ discoverNixFiles yield dirOrFile = do
7373
7474regenerateDerivation :: Derivation -> String -> Bool
7575regenerateDerivation deriv buf = not (pname deriv `elem` patchedPackages) &&
76− not (buf =~ "(pre|post)Configure|(pre|post)Install|patchPhase")
76+ not (buf =~ "(pre|post)Configure|(pre|post)Install|patchPhase|patches")
7777
7878parseNixFile :: FilePath -> String -> Hackage4Nix (Maybe Pkg)
7979parseNixFile path buf