Skip to content

Commit 17d87d7

Browse files
committed
Simplify Nix build
1 parent a4d9450 commit 17d87d7

File tree

4 files changed

+35
-117
lines changed

4 files changed

+35
-117
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
with:
3434
name: argumentcomputer
3535
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
36-
- run: nix run .#test
36+
- run: nix build

flake.lock

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

flake.nix

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
2-
description = "Lean 4 Example Project";
2+
description = "LSpec Nix Flake";
33

44
inputs = {
5-
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
5+
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
66
flake-parts.url = "github:hercules-ci/flake-parts";
77
lean4-nix = {
88
url = "github:argumentcomputer/lean4-nix";
99
inputs.nixpkgs.follows = "nixpkgs";
10-
#rev = "";
1110
};
1211
};
1312

@@ -25,30 +24,24 @@
2524
"x86_64-linux"
2625
];
2726

28-
flake = {
29-
lib = import ./lspec.nix;
30-
};
31-
3227
perSystem = {
3328
system,
3429
pkgs,
3530
self',
3631
config,
3732
...
3833
}:
39-
let
40-
lib = (import ./lspec.nix { inherit pkgs lean4-nix; }).lib;
41-
lspecBin = lib.lspecLib.executable;
42-
in
4334
{
4435
_module.args.pkgs = import nixpkgs {
4536
inherit system;
4637
overlays = [(lean4-nix.readToolchainFile ./lean-toolchain)];
4738
};
48-
# TODO: Replace with a Nix-compatible binary
49-
# Running `lspecBin` will cause an error due to calling `lake` explicitly and only parsing `lakefile.lean` files
50-
# It is included for completeness only
51-
#packages.default = lspecBin;
39+
40+
# Build the library with `nix build`
41+
packages.default = ((lean4-nix.lake {inherit pkgs;}).mkPackage {
42+
src = ./.;
43+
roots = ["LSpec"];
44+
}).modRoot;
5245

5346
devShells.default = pkgs.mkShell {
5447
packages = with pkgs.lean; [lean lean-all];

lspec.nix

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)