-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
37 lines (37 loc) · 1.02 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
};
outputs = inputs @ {
nixpkgs,
flake-parts,
systems,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = import systems;
perSystem = {
pkgs,
lib,
...
}: {
devShells.default = let
python = pkgs.python311;
poetry = pkgs.poetry;
in
pkgs.mkShell.override {stdenv = pkgs.gccStdenv;} {
packages = [poetry python];
POETRY_VIRTUALENVS_IN_PROJECT = true;
LD_LIBRARY_PATH = lib.makeLibraryPath [pkgs.stdenv.cc.cc];
# CPATH = "${pkgs.pcre.dev}/include";
buildInputs = with pkgs; [pcre zlib];
shellHook = ''
${lib.getExe poetry} env use ${lib.getExe python}
${lib.getExe poetry} install --all-extras --no-root
'';
};
};
};
}