forked from awakesecurity/proto3-suite
-
Notifications
You must be signed in to change notification settings - Fork 3
/
shell.nix
33 lines (30 loc) · 872 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Entering the shell for `proto3-suite` requires rebuilding `proto3-suite`
# when basically _any_ file changes, which makes development painful.
#
# If you don't need to run the test suite, you can forgo test dependencies
# and skip `compile-proto-file` codegen by running:
#
# $ nix-shell --arg fast true
#
{ fast ? false
, compiler ? "ghc8107"
, enableDhall ? false
, enableSwagger ? true
, swaggerWrapperFormat ? false
, enableLargeRecords ? false
}:
let
pkgs = import ./nix/pkgs.nix {
inherit compiler enableDhall enableSwagger swaggerWrapperFormat enableLargeRecords;
};
proto3-suite =
if fast then
pkgs.haskellPackages.proto3-suite-boot
else
pkgs.haskellPackages.proto3-suite;
in proto3-suite.env.overrideAttrs (old: {
buildInputs = (old.buildInputs or []) ++ [
pkgs.cabal-install
pkgs.python3Packages.virtualenv
];
})