Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ jobs:
with:
bump_mode: pinned-tags
on_update_fails: pr
build_args: "--wfail"
token: ${{ steps.app-token.outputs.token }}
22 changes: 11 additions & 11 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 11 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
inputs = {
nixpkgs.follows = "lean4-nix/nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
lean4-nix.url = "github:lenianiva/lean4-nix";
lean4-nix.url = "github:argumentcomputer/lean4-nix";
};

outputs = inputs @ {
nixpkgs,
flake-parts,
lean4-nix,
...
Expand All @@ -33,43 +32,41 @@
perSystem = {
system,
pkgs,
self',
config,
...
}: let
lake2nix = pkgs.callPackage lean4-nix.lake {};
lean = lean4-nix.lib.${system}.fromToolchainFile ./lean-toolchain;
lake2nix = pkgs.callPackage lean4-nix.lake {inherit lean;};

# Restrict the build inputs to the files `lake build` reads, so edits
# to the flake, CI config, or docs don't invalidate the build.
src = lake2nix.cleanLakeSource ./.;

# Library build, shared between the package output and the test check
# so the `tests` exe reuses these artifacts instead of recompiling them.
lspec = lake2nix.mkPackage {
name = "LSpec";
src = ./.;
inherit src;
};

# `mkPackage "LSpec"` only builds the library target, so the `tests`
# exe is built explicitly, reusing `lspec`'s build artifacts.
lspecTest = lake2nix.mkPackage {
name = "tests";
src = ./.;
inherit src;
lakeArtifacts = lspec;
};
in {
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [(lean4-nix.readToolchainFile ./lean-toolchain)];
};

# Build the library with `nix build`
packages.default = lspec;

# Build and run the test suite as a flake check (`nix flake check`).
checks.tests = pkgs.runCommand "LSpec-tests" { } ''
checks.tests = pkgs.runCommand "LSpec-tests" {} ''
${lspecTest}/bin/tests
touch $out
'';

devShells.default = pkgs.mkShell {
packages = with pkgs.lean; [lean-all];
packages = [lean];
};
};
};
Expand Down
4 changes: 2 additions & 2 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "63045536fe95024e6c18fc7b48e03f506701c5bc",
"rev": "b7eb3304aeae834b12dda98993a37f6a41f6f0bb",
"name": "plausible",
"manifestFile": "lake-manifest.json",
"inputRev": "v4.31.0",
"inputRev": "v4.33.0",
"inherited": false,
"configFile": "lakefile.toml"}],
"name": "LSpec",
Expand Down
2 changes: 1 addition & 1 deletion lakefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ testDriver = "tests"
[[require]]
name = "plausible"
git = "https://github.com/leanprover-community/plausible"
rev = "v4.31.0"
rev = "v4.33.0"

[[lean_lib]]
name = "LSpec"
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.31.0
leanprover/lean4:v4.33.0