-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
47 lines (46 loc) · 1.38 KB
/
flake.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
inputs = {
fstar.url = "github:fstarlang/fstar";
flake-utils.follows = "fstar/flake-utils";
nixpkgs.follows = "fstar/nixpkgs";
};
outputs = { self, fstar, flake-utils, nixpkgs }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; };
fstarPkgs = fstar.packages.${system};
ocamlPackages = fstarPkgs.ocamlPackages;
default = pkgs.stdenv.mkDerivation {
name = "steel";
src = ./.;
nativeBuildInputs = [
pkgs.dune_3
fstarPkgs.fstar
ocamlPackages.ocaml
ocamlPackages.findlib
ocamlPackages.ppx_deriving_yojson
ocamlPackages.sedlex
ocamlPackages.process
ocamlPackages.pprint
ocamlPackages.menhir
ocamlPackages.menhirLib
ocamlPackages.stdint
ocamlPackages.batteries
ocamlPackages.zarith
ocamlPackages.mtime
];
installPhase = ''
mkdir -p $out
PREFIX=$out make install
'';
enableParallelBuilding = true;
};
steel =
default.overrideAttrs (_: { buildFlags = [ "lib" "verify-steel" ]; });
in {
packages = {
inherit default steel;
};
hydraJobs = { inherit default steel; };
});
}