git.iko.soy/typeable/stackage2nix
on master help sign in
Upd: cabal2nix deps
ba12e01Dmitry Bushev
src/Runner.hs+8−5
@@ -1,4 +1,4 @@
1−module Runner where
1+module Runner ( run ) where
2
2
3import Control.Lens
3import Control.Lens
4import Distribution.Nixpkgs.Haskell.Stack
4import Distribution.Nixpkgs.Haskell.Stack
@@ -14,12 +14,15 @@ run = do
14 stackYaml <- either fail pure =<< readStackConfig (opts ^. optStackYaml)
14 stackYaml <- either fail pure =<< readStackConfig (opts ^. optStackYaml)
15 let
15 let
16 pkgConfig = mkPackageConfig (opts ^. optPlatform) (opts ^. optCompilerId)
16 pkgConfig = mkPackageConfig (opts ^. optPlatform) (opts ^. optCompilerId)
17− overrideConfig = OverrideConfig
17+ overrideConfig = mkOverrideConfig opts
18− { _ocGhc = "ghc802"
19− , _ocStackagePackages = unStackagePackages <$> opts ^. optStackagePackages
20− , _ocStackageConfig = unStackageConfig <$> opts ^. optStackageConfig }
21 packages <- traverse (packageDerivation pkgConfig (opts ^. optHackageDb))
18 packages <- traverse (packageDerivation pkgConfig (opts ^. optHackageDb))
22 $ stackYaml ^. scPackages
19 $ stackYaml ^. scPackages
23 let
20 let
24 out = PP.overrideHaskellPackages overrideConfig packages
21 out = PP.overrideHaskellPackages overrideConfig packages
25 print out
22 print out
23+
24+mkOverrideConfig :: Options -> OverrideConfig
25+mkOverrideConfig opts = OverrideConfig
26+ { _ocGhc = "ghc802"
27+ , _ocStackagePackages = unStackagePackages <$> opts ^. optStackagePackages
28+ , _ocStackageConfig = unStackageConfig <$> opts ^. optStackageConfig }
stack.yaml+1−1
@@ -3,7 +3,7 @@ packages:
3- '.'
3- '.'
4- location:
4- location:
5 git: https://github.com/4e6/cabal2nix.git
5 git: https://github.com/4e6/cabal2nix.git
6− commit: 94a709c1d01e2c5ad2680be918566f24ab0b1099
6+ commit: 7df95c029fb2e33dc9176796e5055bd6c5175ed3
7 extra-dep: true
7 extra-dep: true
8extra-deps:
8extra-deps:
9- distribution-nixpkgs-1.1
9- distribution-nixpkgs-1.1