-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
40 lines (34 loc) · 1.13 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
{
inputs = {
mach-nix.url = "mach-nix/3.5.0";
};
outputs = {self, nixpkgs, mach-nix }@inp:
let
l = nixpkgs.lib // builtins;
supportedSystems = [ "x86_64-linux" "aarch64-darwin" ];
forAllSystems = f: l.genAttrs supportedSystems
(system: f system (import nixpkgs {inherit system;}));
in
{
# enter this python environment by executing `nix shell .`
defaultPackage = forAllSystems (system: pkgs: mach-nix.lib."${system}".mkPython {
requirements = ''
numpy
tqdm
Cython
flit-core
pillow
'';
providers = {
_default = "nixpkgs";
};
_.tinygrad.patches = [];
#_.{package}.buildInputs = [...]; # replace buildInputs
#_.{package}.buildInputs.add = [...]; # add buildInputs
#_.{package}.buildInputs.mod = # modify buildInputs
# oldInputs: filter (inp: ...) oldInputs;
#_.{package}.patches = [...]; # replace patches
#_.{package}.patches.add = [...]; # add patches
});
};
}