git.iko.soy/typeable/stackage2nix
on master help sign in
Rename to stackage2nix
064625aDmitry Bushev
README.md+10−10
@@ -1,18 +1,18 @@
1−# stack2nix
1+# stackage2nix
2
2
3−[![Build Status](https://travis-ci.org/4e6/stack2nix.svg?branch=master)](https://travis-ci.org/4e6/stack2nix)
3+[![Build Status](https://travis-ci.org/4e6/stackage2nix.svg?branch=master)](https://travis-ci.org/4e6/stackage2nix)
4
4
5−`stack2nix` converts a Stack file into a Nix Haskell packages set.
5+`stackage2nix` converts a Stack file into a Nix Haskell packages set.
6It creates LTS Stackage packages set, and applies appropriate overrides on top of it.
6It creates LTS Stackage packages set, and applies appropriate overrides on top of it.
7
7
8```
8```
9−stack2nix \
9+stackage2nix \
10 --lts-haskell "$LTS_HASKELL_REPO" \
10 --lts-haskell "$LTS_HASKELL_REPO" \
11 --all-cabal-hashes "$ALL_CABAL_HASHES_REPO" \
11 --all-cabal-hashes "$ALL_CABAL_HASHES_REPO" \
12 .
12 .
13```
13```
14
14
15−`stack2nix` has three required arguments:
15+`stackage2nix` has three required arguments:
16- `--lts-haskell` - path to [fpco/lts-haskell](https://github.com/fpco/lts-haskell)
16- `--lts-haskell` - path to [fpco/lts-haskell](https://github.com/fpco/lts-haskell)
17- `--all-cabal-hashes` - path to [commercialhaskell/all-cabal-hashes](https://github.com/commercialhaskell/all-cabal-hashes) checked out to `hackage` branch
17- `--all-cabal-hashes` - path to [commercialhaskell/all-cabal-hashes](https://github.com/commercialhaskell/all-cabal-hashes) checked out to `hackage` branch
18- `.` - path to stack.yaml file or directory
18- `.` - path to stack.yaml file or directory
@@ -32,7 +32,7 @@ nix-build -A <package-name>
32
32
33Complex projects may require some extra customization.
33Complex projects may require some extra customization.
34Snippet `override.nix` below shows a minimal example of how to apply additional
34Snippet `override.nix` below shows a minimal example of how to apply additional
35−overrides on top of Haskell packages set produced by `stack2nix`.
35+overrides on top of Haskell packages set produced by `stackage2nix`.
36
36
37```
37```
38with import <nixpkgs> {};
38with import <nixpkgs> {};
@@ -40,13 +40,13 @@ with pkgs.haskell.lib;
40let haskellPackages = import ./. {};
40let haskellPackages = import ./. {};
41in haskellPackages.override {
41in haskellPackages.override {
42 overrides = self: super: {
42 overrides = self: super: {
43− stack2nix = disableSharedExecutables super.stack2nix;
43+ stackage2nix = disableSharedExecutables super.stackage2nix;
44 };
44 };
45}
45}
46```
46```
47
47
48```
48```
49−nix-build -A stack2nix override.nix
49+nix-build -A stackage2nix override.nix
50```
50```
51
51
52For more complex overrides and detailed information on how to work with Haskell packages in Nix, see Nixpkgs manual [User’s Guide to the Haskell Infrastructure](http://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure)
52For more complex overrides and detailed information on how to work with Haskell packages in Nix, see Nixpkgs manual [User’s Guide to the Haskell Infrastructure](http://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure)
@@ -54,5 +54,5 @@ For more complex overrides and detailed information on how to work with Haskell
54
54
55## Examples
55## Examples
56
56
57−For other examples of `stack2nix` usage, see [4e6/stack2nix-examples](https://github.com/4e6/stack2nix-examples) repository.
57+For other examples of `stackage2nix` usage, see [4e6/stackage2nix-examples](https://github.com/4e6/stackage2nix-examples) repository.
58−It verifies `stack2nix` by running it on different public projects.
58+It verifies `stackage2nix` by running it on different public projects.
src/Runner.hs+1−1
@@ -13,7 +13,7 @@ import Distribution.Package (mkPackageName, pkgName)
13import Distribution.Text as Text (display)
13import Distribution.Text as Text (display)
14import Language.Nix as Nix
14import Language.Nix as Nix
15import Options.Applicative
15import Options.Applicative
16−import Paths_stack2nix ( version )
16+import Paths_stackage2nix ( version )
17import Runner.Cli
17import Runner.Cli
18import Stack.Config
18import Stack.Config
19import Stack.Types
19import Stack.Types
src/Runner/Cli.hs+2−2
@@ -9,7 +9,7 @@ import Distribution.Nixpkgs.Haskell.Stack
9import Distribution.System as System
9import Distribution.System as System
10import qualified Distribution.Text as Text
10import qualified Distribution.Text as Text
11import Options.Applicative as Opts
11import Options.Applicative as Opts
12−import Paths_stack2nix ( version )
12+import Paths_stackage2nix ( version )
13import Stack.Types
13import Stack.Types
14import System.Environment
14import System.Environment
15import System.FilePath
15import System.FilePath
@@ -70,7 +70,7 @@ pinfo = info
70 <*> infoOption ("stackage2nix " ++ Text.display version) (long "version" <> help "Show version")
70 <*> infoOption ("stackage2nix " ++ Text.display version) (long "version" <> help "Show version")
71 <*> options )
71 <*> options )
72 ( fullDesc
72 ( fullDesc
73− <> header "stack2nix converts Stack files into build instructions for Nix." )
73+ <> header "stackage2nix converts Stack files into build instructions for Nix." )
74
74
75nixpkgsRepository :: Parser FilePath
75nixpkgsRepository :: Parser FilePath
76nixpkgsRepository = option str
76nixpkgsRepository = option str
stack2nix-test → stackage2nix-testrenamed+5−4
@@ -2,8 +2,9 @@
2
2
3set -e
3set -e
4
4
5+STACKAGE2NIX_WORK_DIR=${STACKAGE2NIX_WORK_DIR:-$HOME}
5−LTS_HASKELL_DIR=${LTS_HASKELL_DIR:-~/lts-haskell}
6+LTS_HASKELL_DIR=${LTS_HASKELL_DIR:-$STACKAGE2NIX_WORK_DIR/lts-haskell}
6−ALL_CABAL_HASHES_DIR=${ALL_CABAL_HASHES_DIR:-~/all-cabal-hashes}
7+ALL_CABAL_HASHES_DIR=${ALL_CABAL_HASHES_DIR:-$STACKAGE2NIX_WORK_DIR/all-cabal-hashes}
7
8
8if [ ! -d "$LTS_HASKELL_DIR" ]; then
9if [ ! -d "$LTS_HASKELL_DIR" ]; then
9 git clone --depth 1 https://github.com/fpco/lts-haskell.git "$LTS_HASKELL_DIR"
10 git clone --depth 1 https://github.com/fpco/lts-haskell.git "$LTS_HASKELL_DIR"
@@ -14,9 +15,9 @@ if [ ! -d "$ALL_CABAL_HASHES_DIR" ]; then
14fi
15fi
15
16
16set -x
17set -x
17−stack exec -- stack2nix \
18+stack exec -- stackage2nix \
18 --lts-haskell "$LTS_HASKELL_DIR" \
19 --lts-haskell "$LTS_HASKELL_DIR" \
19 --all-cabal-hashes "$ALL_CABAL_HASHES_DIR" \
20 --all-cabal-hashes "$ALL_CABAL_HASHES_DIR" \
20 .
21 .
21
22
22−nix-build -A stack2nix "$@"
23+nix-build -A stackage2nix "$@"
stack2nix.cabal → stackage2nix.cabalrenamed+9−8
@@ -1,10 +1,11 @@
1−name: stack2nix
1+name: stackage2nix
2version: 0.2.0
2version: 0.2.0
3synopsis: Convert Stack files into Nix build instructions.
3synopsis: Convert Stack files into Nix build instructions.
4−homepage: https://github.com/4e6/stack2nix#readme
4+homepage: https://github.com/4e6/stackage2nix#readme
5license: BSD3
5license: BSD3
6license-file: LICENSE
6license-file: LICENSE
7author: Dmitry Bushev
7author: Dmitry Bushev
8+ , Benno Fünfstück
8maintainer: bushevdv@gmail.com
9maintainer: bushevdv@gmail.com
9category: Distribution, Nix
10category: Distribution, Nix
10build-type: Simple
11build-type: Simple
@@ -27,7 +28,7 @@ library
27 , Stack.Types
28 , Stack.Types
28 other-modules: AllCabalHashes
29 other-modules: AllCabalHashes
29 , LtsHaskell
30 , LtsHaskell
30− , Paths_stack2nix
31+ , Paths_stackage2nix
31 build-depends: base > 4.7 && < 5
32 build-depends: base > 4.7 && < 5
32 , Cabal > 1.24
33 , Cabal > 1.24
33 , QuickCheck
34 , QuickCheck
@@ -58,12 +59,12 @@ library
58 default-language: Haskell2010
59 default-language: Haskell2010
59 ghc-options: -Wall -funbox-strict-fields
60 ghc-options: -Wall -funbox-strict-fields
60
61
61−executable stack2nix
62+executable stackage2nix
62− hs-source-dirs: stack2nix
63+ hs-source-dirs: stackage2nix
63 main-is: Main.hs
64 main-is: Main.hs
64 ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
65 ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
65 build-depends: base
66 build-depends: base
66− , stack2nix
67+ , stackage2nix
67 default-language: Haskell2010
68 default-language: Haskell2010
68
69
69test-suite spec
70test-suite spec
@@ -76,7 +77,7 @@ test-suite spec
76 , hspec
77 , hspec
77 , pretty
78 , pretty
78 , shakespeare
79 , shakespeare
79− , stack2nix
80+ , stackage2nix
80 , text
81 , text
81 , yaml
82 , yaml
82 default-extensions: OverloadedStrings
83 default-extensions: OverloadedStrings
@@ -88,4 +89,4 @@ test-suite spec
88
89
89source-repository head
90source-repository head
90 type: git
91 type: git
91− location: https://github.com/4e6/stack2nix
92+ location: https://github.com/4e6/stackage2nix
stack2nix/Main.hs → stackage2nix/Main.hsrenamed

The content is the same.