-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
34 lines (32 loc) · 1.01 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
{
description = "BITEHack project";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.mach-nix.url = "github:DavHau/mach-nix";
outputs = inputs@{ self, nixpkgs, flake-utils, mach-nix, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
python = "python39";
mach-nix-wrapper = import mach-nix { inherit pkgs python; };
requirements = ''
${builtins.readFile ./requirements.txt}
pip
black
pyflakes
isort
'';
pythonBuild = mach-nix-wrapper.mkPython { inherit requirements; };
in {
packages.venv = pythonBuild;
defaultPackage = self.packages.x86_64-linux.venv;
devShell = pkgs.mkShell {
buildInputs = [
(pkgs.${python}.withPackages
(ps: with ps; [ pip black pyflakes isort ]))
pkgs.nodePackages.pyright
pkgs.glpk
pythonBuild
];
};
});
}