Skip to content

Commit d1a18a3

Browse files
committed
chore: Use pre-built Lean binary in Nix build
1 parent 1fc461a commit d1a18a3

3 files changed

Lines changed: 12 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,3 @@ jobs:
1919
- uses: leanprover/lean-action@v1
2020
with:
2121
build-args: "--wfail"
22-
23-
nix:
24-
name: Nix Flake Check
25-
runs-on: ubuntu-latest
26-
steps:
27-
- uses: actions/checkout@v5
28-
- uses: cachix/install-nix-action@v31
29-
with:
30-
nix_path: nixpkgs=channel:nixos-unstable
31-
github_access_token: ${{ secrets.GITHUB_TOKEN }}
32-
- run: nix build --accept-flake-config

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
{
22
description = "LSpec Nix Flake";
33

4-
nixConfig = {
5-
extra-substituters = [
6-
"https://cache.garnix.io"
7-
];
8-
extra-trusted-public-keys = [
9-
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
10-
];
11-
};
12-
134
inputs = {
145
nixpkgs.follows = "lean4-nix/nixpkgs";
156
flake-parts.url = "github:hercules-ci/flake-parts";
@@ -36,22 +27,22 @@
3627
self',
3728
config,
3829
...
39-
}:
40-
{
30+
}: {
4131
_module.args.pkgs = import nixpkgs {
4232
inherit system;
4333
overlays = [(lean4-nix.readToolchainFile ./lean-toolchain)];
4434
};
4535

4636
# Build the library with `nix build`
47-
packages.default = ((lean4-nix.lake {inherit pkgs;}).mkPackage {
37+
packages.default =
38+
((lean4-nix.lake {inherit pkgs;}).mkPackage {
4839
src = ./.;
4940
roots = ["LSpec"];
50-
}).modRoot;
41+
}).modRoot;
5142

5243
devShells.default = pkgs.mkShell {
53-
packages = with pkgs.lean; [lean lean-all];
44+
packages = with pkgs.lean; [lean];
5445
};
46+
};
5547
};
56-
};
5748
}

0 commit comments

Comments
 (0)