-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
49 lines (47 loc) · 1.67 KB
/
Copy pathflake.nix
File metadata and controls
49 lines (47 loc) · 1.67 KB
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
48
49
{
description = "shake: CLI argument parser for Bend 2";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# bendlang/bend's flake at the commit that packages 2.0.34 (the v2.0.34 tag
# still packages 2.0.33)
inputs.bend = {
url = "github:bendlang/bend/777ee0b55c485afdd7e68bd917b3d23a88d77371";
inputs.nixpkgs.follows = "nixpkgs";
};
inputs.ez = {
url = "github:Emerging-Patterns/ez";
inputs.nixpkgs.follows = "nixpkgs";
inputs.bend.follows = "bend";
};
outputs = { self, nixpkgs, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
ez = inputs.ez.lib.${system};
ezBin = inputs.ez.packages.${system}.default;
bend = inputs.bend.packages.${system}.default;
bend-cc = ez.bend-cc;
demo = ez.mkPackage {
inherit bend;
src = self;
pname = "demo";
version = "0.5.0"; # x-release-please-version
entry = "examples/demo/main.bend";
};
in {
packages.${system} = { inherit bend demo bend-cc; ez = ezBin; default = demo; };
apps.${system}.default = { type = "app"; program = "${demo}/bin/demo"; };
# `proofs` is `ez prove`: every PROOF.bend on this flake's bend, its
# first line `ALL PROOFS CHECK`. `lint` is bolt at the lock's
# `[tools.bolt]` pin, graded by ./bolt.bend.
checks.${system} = {
inherit demo;
proofs = ez.mkProofs { ez = ezBin; src = self; };
lint = ez.mkLint { src = self; };
};
# bolt, from the lock, is on PATH through `src`
devShells.${system}.default = ez.mkShell {
src = self;
packages = [ bend bend-cc ezBin ];
};
};
}