-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
52 lines (46 loc) · 1.39 KB
/
flake.nix
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
50
51
52
# run with: nix develop
# see metadata with: nix flake metadata
# debug with: nix repl
# :lf .#
# check with: nix flake check
# If you want to update a locked input to the latest version, you need to ask
# for it: nix flake lock --update-input nixpkgs
# show available packages: nix-env -qa
# nix search nixpkgs
# show nixos version: nixos-version
#
{
description = "Boot.dev Environment for Nix 24.05";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
};
outputs = { self, nixpkgs }: {
devShells = {
x86_64-linux.default = self.buildDevShell "x86_64-linux";
aarch64-linux.default = self.buildDevShell "aarch64-linux";
x86_64-darwin.default = self.buildDevShell "x86_64-darwin";
};
} // {
buildDevShell = system: let
pkgs = import nixpkgs { inherit system; };
in
pkgs.mkShell {
name = "impurePythonEnv";
venvDir = "./.venv";
packages = (with pkgs; [
go
]) ++
([
(pkgs.callPackage ./bootdev.nix {})
]);
buildInputs = with pkgs; [
python3Packages.python
python3Packages.venvShellHook
];
postVenvCreation = ''
unset SOURCE_DATE_EPOCH
pip install -r requirements.txt
'';
};
};
}