git.iko.soy/typeable/cabal2nix
on master help sign in
Fix hlint warnings.
commitca341aad8e7b5e357d122f05b4a3d4ec264e166c authorPeter Simons <simons@cryp.to> dateMon 26 Jan 2015, 17:48 (12 years ago) parentc45599a
3 files changed+8−5
GNUmakefile+4−1 src/Cabal2Nix/Generate.hs+1−1 src/Distribution/Nixpkgs/Haskell.hs+3−3
GNUmakefile+4−1
@@ -1,6 +1,6 @@
11# GNUmakefile
22
3−.PHONY: all configure build check haddock
3+.PHONY: all configure build check haddock hlint
44
55all:: check
66
@@ -16,6 +16,9 @@ haddock:: build
1616check:: haddock
1717 @cabal test -j
1818
19+hlint::
20+ hlint src
21+
1922cabal2nix.cabal: generate-cabal-file.hs
2023 runhaskell "$<" >"$@"
2124 cabal check
src/Cabal2Nix/Generate.hs+1−1
@@ -26,7 +26,7 @@ cabal2nix flags' cabal = drv { cabalFlags = flags }
2626 cabal
2727
2828cabal2nix' :: Cabal.PackageDescription -> Derivation
29−cabal2nix' tpkg = normalize $ postProcess $ normalize $ MkDerivation
29+cabal2nix' tpkg = normalize $ postProcess $ normalize MkDerivation
3030 { pname = let Cabal.PackageName x = Cabal.pkgName pkg in x
3131 , version = Cabal.pkgVersion pkg
3232 , revision = maybe 0 read (lookup "x-revision" xfields)
src/Distribution/Nixpkgs/Haskell.hs+3−3
@@ -1,4 +1,4 @@
1−{-# LANGUAGE PatternGuards, RecordWildCards, DeriveGeneric, StandaloneDeriving #-}
1+{-# LANGUAGE RecordWildCards, DeriveGeneric, StandaloneDeriving #-}
22{-# OPTIONS_GHC -fno-warn-orphans #-} -- for FlagName below
33
44module Distribution.Nixpkgs.Haskell
@@ -80,8 +80,8 @@ renderDerivation (MkDerivation {..}) =
8080 , attr "version" $ doubleQuotes (disp version)
8181 , sourceAttr src
8282 , onlyIf (not (null editedCabalFile)) $ attr "editedCabalFile" $ string editedCabalFile
83− , boolattr "isLibrary" ((not isLibrary) || isExecutable) isLibrary
84− , boolattr "isExecutable" ((not isLibrary) || isExecutable) isExecutable
83+ , boolattr "isLibrary" (not isLibrary || isExecutable) isLibrary
84+ , boolattr "isExecutable" (not isLibrary || isExecutable) isExecutable
8585 , listattr "buildDepends" empty (toAscList buildDepends)
8686 , listattr "testDepends" empty (toAscList testDepends)
8787 , listattr "buildTools" empty (toAscList buildTools)