-
Notifications
You must be signed in to change notification settings - Fork 44
/
shell.nix
31 lines (30 loc) · 1.11 KB
/
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
{ haskell ? true
, coq ? true
, c ? true
, nixpkgs ? import <nixpkgs> {}
, ghc ? "ghc98"
, coqPackages ? "coqPackages_8_17"
, env ? "stdenv"
, withCoverage ? true
, withProfiler ? true
, withSafegcdCheat ? true
, withValgrind ? true
}:
let
simplicity = import ./. {inherit nixpkgs ghc coqPackages env withCoverage withProfiler withSafegcdCheat withValgrind;};
optional = nixpkgs.lib.optional;
haskellDevTools = pkgs: with pkgs; [cabal-install hlint hasktags];
haskellPkgs = pkgs: simplicity.haskell.buildInputs ++ simplicity.haskell.propagatedBuildInputs ++ haskellDevTools pkgs;
haskellDevEnv = simplicity.haskellPackages.ghcWithPackages haskellPkgs;
coqDevEnv = [ nixpkgs.python3Packages.alectryon
nixpkgs.${coqPackages}.serapi
nixpkgs.${coqPackages}.coq
nixpkgs.${coqPackages}.coqide
];
in
nixpkgs.mkShell {
packages = optional haskell haskellDevEnv
++ optional coq coqDevEnv;
inputsFrom = optional coq simplicity.coq
++ optional c simplicity.c;
}