flake: replace runCommandLocal with builtin functions to avoid IFD

Pointed out in https://github.com/nix-community/authentik-nix/issues/5

Co-authored-by: Philip Henning <philip.henning@base23.de>
This commit is contained in:
WilliButz 2023-12-10 21:09:17 +01:00
parent 07c6476fbf
commit d12bdcc87d
No known key found for this signature in database
GPG key ID: FB0513677AB15BEA

View file

@ -104,13 +104,15 @@
projectDir = authentik-src; projectDir = authentik-src;
python = pkgs.python311; python = pkgs.python311;
overrides = [ defaultPoetryOverrides ] ++ (import ./poetry2nix-python-overrides.nix pkgs); overrides = [ defaultPoetryOverrides ] ++ (import ./poetry2nix-python-overrides.nix pkgs);
# workaround to remove dev-dependencies for the current combination of legacy pyproject.toml format
# used by authentik and poetry2nix's behavior
groups = []; groups = [];
checkGroups = []; checkGroups = [];
pyproject = pkgs.runCommandLocal "patched-pyproject.toml" {} '' # workaround to remove dev-dependencies for the current combination of legacy pyproject.toml format
sed -e 's,tool.poetry.dev-dependencies,tool.poetry.group.dev.dependencies,' ${authentik-src}/pyproject.toml > $out # 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")
);
}; };
# server + outposts # server + outposts
gopkgs = pkgs.buildGo121Module { gopkgs = pkgs.buildGo121Module {