-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
48 lines (48 loc) · 1.26 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/master";
nix-utils = {
url = "github:mislavzanic/nix-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{nixpkgs,nix-utils,...}: let
inherit (nix-utils) mkPkgs mkLib;
system = "x86_64-linux";
pkgs = mkPkgs {inherit system; overlays = []; pkgs = nixpkgs;};
in {
devShells."${system}" = {
python = pkgs.mkShell {
buildInputs = with pkgs;
let
pythonPackages = ps: [
ps.requests
ps.beautifulsoup4
ps.z3
ps.numpy
ps.matplotlib
ps.pandas
ps.scipy
ps.sympy
ps.ipython
ps.colorama
ps.networkx
];
in [
(python311.withPackages pythonPackages)
nodePackages.pyright
poetry
pypy3
# (pypy3.withPackages pythonPackages)
];
shellHook = ''
export PATH="$(pwd)/alias:$PATH"
export PYTHONPATH="$(pwd):$PYTHONPATH"
export INPUT_DIR="$(pwd)/input"
export AOC_RUN="$(pwd)/run.py"
export TOKEN_FILE="$HOME/.config/.aoc_token"
'';
};
};
};
}