authentik-nix/components/pythonEnv.nix
2025-02-02 14:25:09 +01:00

25 lines
655 B
Nix

{
authentik-src,
authentikPoetryOverrides,
defaultPoetryOverrides,
lib,
mkPoetryEnv,
python312,
}:
mkPoetryEnv {
projectDir = authentik-src;
python = python312;
overrides = [
defaultPoetryOverrides
] ++ authentikPoetryOverrides;
groups = [ "main" ];
checkGroups = [ ];
# workaround to remove dev-dependencies for the current combination of legacy
# used by authentik and poetry2nix's behavior
pyproject = builtins.toFile "patched-pyproject.toml" (
lib.replaceStrings [ "tool.poetry.dev-dependencies" ] [ "tool.poetry.group.dev.dependencies" ] (
builtins.readFile "${authentik-src}/pyproject.toml"
)
);
}