git.iko.soy/typeable/cabal2nix
on master help sign in
Update for language-nix 2.1.
commit5c9606153f3a14a027a201eb4648930e6ae358df authorPeter Simons <simons@cryp.to> dateSat 19 Sep 2015, 20:57 (11 years ago) parent351b6f8
9 files changed+18−18
cabal2nix/cabal2nix.cabal+2−2 cabal2nix/package.yaml+1−1 distribution-nixpkgs/distribution-nixpkgs.cabal+4−4 distribution-nixpkgs/package.yaml+2−2 distribution-nixpkgs/src/Distribution/Nixpkgs/PackageMap.hs+2−2 hackage2nix/hackage2nix.cabal+3−3 hackage2nix/package.yaml+2−2 hackage2nix/src/Main.hs+1−1 stack.yaml+1−1
cabal2nix/cabal2nix.cabal+2−2
@@ -1,9 +1,9 @@
1−-- This file has been generated from package.yaml by hpack version 0.7.0.
1+-- This file has been generated from package.yaml by hpack version 0.7.1.
22--
33-- see: https://github.com/sol/hpack
44
55name: cabal2nix
6−version: 20150903
6+version: 20150919
77synopsis: Convert Cabal files into Nix build instructions.
88description: Convert Cabal files into Nix build instructions.
99category: Distribution
cabal2nix/package.yaml+1−1
@@ -1,5 +1,5 @@
11name: cabal2nix
2−version: "20150903"
2+version: "20150919"
33synopsis: Convert Cabal files into Nix build instructions.
44description: Convert Cabal files into Nix build instructions.
55maintainer: Peter Simons <simons@cryp.to>
distribution-nixpkgs/distribution-nixpkgs.cabal+4−4
@@ -1,9 +1,9 @@
1−-- This file has been generated from package.yaml by hpack version 0.7.0.
1+-- This file has been generated from package.yaml by hpack version 0.7.1.
22--
33-- see: https://github.com/sol/hpack
44
55name: distribution-nixpkgs
6−version: 20150903
6+version: 20150919
77synopsis: Convert Cabal files into Nix build instructions.
88description: Convert Cabal files into Nix build instructions.
99category: Distribution
@@ -34,7 +34,7 @@ library
3434 , filepath
3535 , hackage-db
3636 , hashable
37− , language-nix
37+ , language-nix > 2
3838 , lens
3939 , pretty >= 1.1.2
4040 , process
@@ -86,7 +86,7 @@ test-suite spec
8686 , filepath
8787 , hackage-db
8888 , hashable
89− , language-nix
89+ , language-nix > 2
9090 , lens
9191 , pretty >= 1.1.2
9292 , process
distribution-nixpkgs/package.yaml+2−2
@@ -1,5 +1,5 @@
11name: distribution-nixpkgs
2−version: "20150903"
2+version: "20150919"
33synopsis: Convert Cabal files into Nix build instructions.
44description: Convert Cabal files into Nix build instructions.
55maintainer: Peter Simons <simons@cryp.to>
@@ -20,7 +20,7 @@ dependencies:
2020 - filepath
2121 - hackage-db
2222 - hashable
23− - language-nix
23+ - language-nix > 2
2424 - lens
2525 - pretty >= 1.1.2
2626 - process
distribution-nixpkgs/src/Distribution/Nixpkgs/PackageMap.hs+2−2
@@ -13,7 +13,7 @@ import Data.Map.Strict ( Map )
1313import Data.Maybe
1414import Data.Set ( Set )
1515import qualified Data.Set as Set
16−import Text.PrettyPrint.HughesPJClass
16+import Distribution.Text
1717import Language.Nix
1818import System.Process
1919import Control.Lens
@@ -25,7 +25,7 @@ readNixpkgPackageMap nixpkgs attrpath = fmap identifierSet2PackageMap (readNixpk
2525
2626readNixpkgSet :: FilePath -> Maybe Path -> IO (Set String)
2727readNixpkgSet nixpkgs attrpath = do
28− let extraArgs = maybe [] (\p -> ["-A", render (pPrint p)]) attrpath
28+ let extraArgs = maybe [] (\p -> ["-A", display p]) attrpath
2929 (_, Just h, _, _) <- createProcess (proc "nix-env" (["-qaP", "--json", "-f", nixpkgs] ++ extraArgs))
3030 { std_out = CreatePipe, env = Nothing } -- TODO: ensure that overrides don't screw up our results
3131 buf <- LBS.hGetContents h
hackage2nix/hackage2nix.cabal+3−3
@@ -1,9 +1,9 @@
1−-- This file has been generated from package.yaml by hpack version 0.7.0.
1+-- This file has been generated from package.yaml by hpack version 0.7.1.
22--
33-- see: https://github.com/sol/hpack
44
55name: hackage2nix
6−version: 20150903
6+version: 20150919
77synopsis: Convert Cabal files into Nix build instructions.
88description: Convert Cabal files into Nix build instructions.
99category: Distribution
@@ -34,7 +34,7 @@ executable hackage2nix
3434 , directory
3535 , distribution-nixpkgs
3636 , filepath
37− , language-nix
37+ , language-nix > 2
3838 , lens
3939 , monad-par
4040 , monad-par-extras
hackage2nix/package.yaml+2−2
@@ -1,5 +1,5 @@
11name: hackage2nix
2−version: "20150903"
2+version: "20150919"
33synopsis: Convert Cabal files into Nix build instructions.
44description: Convert Cabal files into Nix build instructions.
55maintainer: Peter Simons <simons@cryp.to>
@@ -19,7 +19,7 @@ dependencies:
1919 - directory
2020 - distribution-nixpkgs
2121 - filepath
22− - language-nix
22+ - language-nix > 2
2323 - lens
2424 - monad-par
2525 - monad-par-extras
hackage2nix/src/Main.hs+1−1
@@ -172,7 +172,7 @@ main = do
172172 & metaSection.hydraPlatforms %~ (if isInDefaultPackageSet then id else const Set.empty)
173173
174174 overrides :: Doc
175− overrides = fcat $ punctuate space [ pPrint b | b <- Set.toList (view (dependencies . each) drv), not (isFromHackage b) ]
175+ overrides = fcat $ punctuate space [ disp b <> semi | b <- Set.toList (view (dependencies . each) drv), not (isFromHackage b) ]
176176 return $ render $ nest 2 $
177177 hang (doubleQuotes (text attr) <+> equals <+> text "callPackage") 2 (parens (pPrint drv)) <+> (braces overrides <> semi)
178178
stack.yaml+1−1
@@ -5,5 +5,5 @@ packages:
55 - hackage2nix
66extra-deps:
77 - nix-paths-1
8− - language-nix-2
8+ - language-nix-2.1
99resolver: lts-3.4