Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup stack's nix integration #63

Merged
merged 5 commits into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ script:
- if [ "$TRAVIS_BRANCH" == "master" ]; then make stylish && git diff-index --quiet HEAD; fi

- make test-libraries

- curl https://nixos.org/nix/install | sh
- . $HOME/.nix-profile/etc/profile.d/nix.sh
- stack --nix test hs-abci-types hs-abci-server hs-abci-sdk
14 changes: 14 additions & 0 deletions shell-stack.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ ghc
, nixpkgs ? import (builtins.fetchTarball {
name = "nixpkgs-PR-71165";
url = https://github.com/nixos/nixpkgs/archive/e3b740516f05307b55bcdb7e46c5d55da5fe0443.tar.gz;
sha256 = "0ssl12nl3n5bp23yng3naji0yw012a12xb2sa8kwdp2ln0qf8mcy";
}) {}
}:
with nixpkgs;

haskell.lib.buildStackProject {
inherit ghc;
name = "hs-abci";
buildInputs = [ git hlint protobuf haskellPackages.stylish-haskell zlib ];
}
4 changes: 4 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# https://www.stackage.org/lts-13.27
resolver: lts-14.11

nix:
#enabled: bool # defaults to true on nixos, false everywhere else
shell-file: shell-stack.nix

packages:
- ./hs-abci-types
- ./hs-tendermint-client
Expand Down