Skip to content

Commit

Permalink
Add shell.nix (awakesecurity#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriella439 authored Mar 24, 2018
1 parent c577889 commit 9354784
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ Alternately, the `nix-shell` environment provides an incremental build
environment (but see below for testing). From the root of this repository:

```bash
$ nix-shell release.nix -A proto3-suite-no-tests.env
$ nix-shell
[nix-shell]$ cabal configure
[nix-shell]$ cabal build
```

Once your source code compiles and you want to test, do this instead:

```bash
$ nix-shell release.nix -A proto3-suite.env
$ nix-shell
[nix-shell]$ cabal configure --enable-tests
[nix-shell]$ cabal build
[nix-shell]$ cabal test
Expand Down
8 changes: 4 additions & 4 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ let
darwinPkgs = import nixpkgs { inherit config; system = "x86_64-darwin"; };
pkgs = import nixpkgs { inherit config; };
in
{ proto3-suite-linux = linuxPkgs.haskellPackages.proto3-suite;
proto3-suite-darwin = darwinPkgs.haskellPackages.proto3-suite;
proto3-suite = pkgs.haskellPackages.proto3-suite;
proto3-suite-no-tests = pkgs.haskellPackages.proto3-suite-no-tests;
{ proto3-suite-linux = linuxPkgs.haskellPackages.proto3-suite;
proto3-suite-darwin = darwinPkgs.haskellPackages.proto3-suite;
proto3-suite = pkgs.haskellPackages.proto3-suite;
proto3-suite-boot = pkgs.haskellPackages.proto3-suite-boot;
}
1 change: 1 addition & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(import ./release.nix).proto3-suite-boot.env
2 changes: 1 addition & 1 deletion tests/generate-test-types.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROTO3_SUITE_NO_TESTS=$(nix-build --no-out-link ../release.nix -A proto3-suite-no-tests)
PROTO3_SUITE_NO_TESTS=$(nix-build --no-out-link ../release.nix -A proto3-suite-boot)
"${PROTO3_SUITE_NO_TESTS}"/bin/compile-proto-file --out . --includeDir ../test-files --proto test_proto.proto
"${PROTO3_SUITE_NO_TESTS}"/bin/compile-proto-file --out . --includeDir ../test-files --proto test_proto_import.proto
"${PROTO3_SUITE_NO_TESTS}"/bin/compile-proto-file --out . --includeDir ../test-files --proto test_proto_oneof.proto
Expand Down

0 comments on commit 9354784

Please sign in to comment.