-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
38 lines (38 loc) · 1.02 KB
/
flake.nix
File metadata and controls
38 lines (38 loc) · 1.02 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
{
description = "A development environment for Lean 4 using elan and VS Code.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs2405.url = "github:NixOS/nixpkgs/nixos-24.05";
};
outputs = { self, nixpkgs, nixpkgs2405, ... }:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
mkShellFor = system:
let
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
};
in
pkgs.mkShell {
buildInputs = with pkgs; [
lean4
elan
vscode
];
shellHook = ''
echo "Entering Nix shell with Lean and VS Code..."
export PS1="\[\e[1;32m\][nix-shell:\w]$\[\e[m\] "
export PATH="$PWD/.lake/build/bin:$PATH"
'';
};
in
{
devShells = forAllSystems (system: {
default = mkShellFor system;
});
};
}