git.iko.soy/typeable/stackage2nix
on master help sign in
Rename to stackage2nix
commit064625a695290628492f13bea37dada9d58a18f9 authorDmitry Bushev <bushevdv@gmail.com> dateMon 21 Aug 2017, 18:06 (9 years ago) parentc67c0d8
6 files changed+27−25
README.md+10−10 src/Runner.hs+1−1 src/Runner/Cli.hs+2−2 stack2nix-test → stackage2nix-test+5−4 stack2nix.cabal → stackage2nix.cabal+9−8 stack2nix/Main.hs → stackage2nix/Main.hs
README.md+10−10
@@ -1,18 +1,18 @@
1−# stack2nix
1+# stackage2nix
22
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)
44
5−`stack2nix` converts a Stack file into a Nix Haskell packages set.
5+`stackage2nix` converts a Stack file into a Nix Haskell packages set.
66It creates LTS Stackage packages set, and applies appropriate overrides on top of it.
77
88```
9−stack2nix \
9+stackage2nix \
1010 --lts-haskell "$LTS_HASKELL_REPO" \
1111 --all-cabal-hashes "$ALL_CABAL_HASHES_REPO" \
1212 .
1313```
1414
15−`stack2nix` has three required arguments:
15+`stackage2nix` has three required arguments:
1616- `--lts-haskell` - path to [fpco/lts-haskell](https://github.com/fpco/lts-haskell)
1717- `--all-cabal-hashes` - path to [commercialhaskell/all-cabal-hashes](https://github.com/commercialhaskell/all-cabal-hashes) checked out to `hackage` branch
1818- `.` - path to stack.yaml file or directory
@@ -32,7 +32,7 @@ nix-build -A <package-name>
3232
3333Complex projects may require some extra customization.
3434Snippet `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`.
3636
3737```
3838with import <nixpkgs> {};
@@ -40,13 +40,13 @@ with pkgs.haskell.lib;
4040let haskellPackages = import ./. {};
4141in haskellPackages.override {
4242 overrides = self: super: {
43− stack2nix = disableSharedExecutables super.stack2nix;
43+ stackage2nix = disableSharedExecutables super.stackage2nix;
4444 };
4545}
4646```
4747
4848```
49−nix-build -A stack2nix override.nix
49+nix-build -A stackage2nix override.nix
5050```
5151
5252For 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
5454
5555## Examples
5656
57−For other examples of `stack2nix` usage, see [4e6/stack2nix-examples](https://github.com/4e6/stack2nix-examples) repository.
58−It verifies `stack2nix` by running it on different public projects.
57+For other examples of `stackage2nix` usage, see [4e6/stackage2nix-examples](https://github.com/4e6/stackage2nix-examples) repository.
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)
1313import Distribution.Text as Text (display)
1414import Language.Nix as Nix
1515import Options.Applicative
16−import Paths_stack2nix ( version )
16+import Paths_stackage2nix ( version )
1717import Runner.Cli
1818import Stack.Config
1919import Stack.Types
src/Runner/Cli.hs+2−2
@@ -9,7 +9,7 @@ import Distribution.Nixpkgs.Haskell.Stack
99import Distribution.System as System
1010import qualified Distribution.Text as Text
1111import Options.Applicative as Opts
12−import Paths_stack2nix ( version )
12+import Paths_stackage2nix ( version )
1313import Stack.Types
1414import System.Environment
1515import System.FilePath
@@ -70,7 +70,7 @@ pinfo = info
7070 <*> infoOption ("stackage2nix " ++ Text.display version) (long "version" <> help "Show version")
7171 <*> options )
7272 ( fullDesc
73− <> header "stack2nix converts Stack files into build instructions for Nix." )
73+ <> header "stackage2nix converts Stack files into build instructions for Nix." )
7474
7575nixpkgsRepository :: Parser FilePath
7676nixpkgsRepository = option str
stack2nix-test → stackage2nix-testrenamed+5−4
@@ -2,8 +2,9 @@
22
33set -e
44
5−LTS_HASKELL_DIR=${LTS_HASKELL_DIR:-~/lts-haskell}
6−ALL_CABAL_HASHES_DIR=${ALL_CABAL_HASHES_DIR:-~/all-cabal-hashes}
5+STACKAGE2NIX_WORK_DIR=${STACKAGE2NIX_WORK_DIR:-$HOME}
6+LTS_HASKELL_DIR=${LTS_HASKELL_DIR:-$STACKAGE2NIX_WORK_DIR/lts-haskell}
7+ALL_CABAL_HASHES_DIR=${ALL_CABAL_HASHES_DIR:-$STACKAGE2NIX_WORK_DIR/all-cabal-hashes}
78
89if [ ! -d "$LTS_HASKELL_DIR" ]; then
910 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
1415fi
1516
1617set -x
17−stack exec -- stack2nix \
18+stack exec -- stackage2nix \
1819 --lts-haskell "$LTS_HASKELL_DIR" \
1920 --all-cabal-hashes "$ALL_CABAL_HASHES_DIR" \
2021 .
2122
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
22version: 0.2.0
33synopsis: Convert Stack files into Nix build instructions.
4−homepage: https://github.com/4e6/stack2nix#readme
4+homepage: https://github.com/4e6/stackage2nix#readme
55license: BSD3
66license-file: LICENSE
77author: Dmitry Bushev
8+ , Benno Fünfstück
89maintainer: bushevdv@gmail.com
910category: Distribution, Nix
1011build-type: Simple
@@ -27,7 +28,7 @@ library
2728 , Stack.Types
2829 other-modules: AllCabalHashes
2930 , LtsHaskell
30− , Paths_stack2nix
31+ , Paths_stackage2nix
3132 build-depends: base > 4.7 && < 5
3233 , Cabal > 1.24
3334 , QuickCheck
@@ -58,12 +59,12 @@ library
5859 default-language: Haskell2010
5960 ghc-options: -Wall -funbox-strict-fields
6061
61−executable stack2nix
62− hs-source-dirs: stack2nix
62+executable stackage2nix
63+ hs-source-dirs: stackage2nix
6364 main-is: Main.hs
6465 ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
6566 build-depends: base
66− , stack2nix
67+ , stackage2nix
6768 default-language: Haskell2010
6869
6970test-suite spec
@@ -76,7 +77,7 @@ test-suite spec
7677 , hspec
7778 , pretty
7879 , shakespeare
79− , stack2nix
80+ , stackage2nix
8081 , text
8182 , yaml
8283 default-extensions: OverloadedStrings
@@ -88,4 +89,4 @@ test-suite spec
8889
8990source-repository head
9091 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.