git.iko.soy/typeable/cabal2nix
on master help sign in
Hackage4Nix: don't re-generate expressions that have a "patches" attribute
1c5e9b7Peter Simons
README.md+1
@@ -129,6 +129,7 @@ Cabal files. The exceptions are:
129 (pre|post)Configure
129 (pre|post)Configure
130 (pre|post)Install
130 (pre|post)Install
131 patchPhase
131 patchPhase
132+ patches
132
133
133 are considered "patched". That list of attributes is hard-coded in
134 are considered "patched". That list of attributes is hard-coded in
134 [`hackage4nix.hs`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs)
135 [`hackage4nix.hs`](http://github.com/NixOS/cabal2nix/blob/master/src/Hackage4Nix.hs)
cabal2nix.cabal+3−3
@@ -1,5 +1,5 @@
1Name: cabal2nix
1Name: cabal2nix
2−Version: 1.27
2+Version: 1.28
3Copyright: Peter Simons, Andres Loeh
3Copyright: Peter Simons, Andres Loeh
4License: BSD3
4License: BSD3
5License-File: LICENSE
5License-File: LICENSE
@@ -31,8 +31,8 @@ Description:
31 .
31 .
32 The only required argument is the path to the cabal file. For example:
32 The only required argument is the path to the cabal file. For example:
33 .
33 .
34− > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.27/cabal2nix.cabal
34+ > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.28/cabal2nix.cabal
35− > cabal2nix cabal://cabal2nix-1.27
35+ > cabal2nix cabal://cabal2nix-1.28
36 .
36 .
37 If the @--sha256@ option has not been specified, cabal2nix calls
37 If the @--sha256@ option has not been specified, cabal2nix calls
38 @nix-prefetch-url@ to determine the hash automatically. This causes
38 @nix-prefetch-url@ to determine the hash automatically. This causes
src/Hackage4Nix.hs+1−1
@@ -73,7 +73,7 @@ discoverNixFiles yield dirOrFile = do
73
73
74regenerateDerivation :: Derivation -> String -> Bool
74regenerateDerivation :: Derivation -> String -> Bool
75regenerateDerivation deriv buf = not (pname deriv `elem` patchedPackages) &&
75regenerateDerivation 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")
77
77
78parseNixFile :: FilePath -> String -> Hackage4Nix (Maybe Pkg)
78parseNixFile :: FilePath -> String -> Hackage4Nix (Maybe Pkg)
79parseNixFile path buf
79parseNixFile path buf