From d12bdcc87ddaf188133034ef98968ac639c10c6d Mon Sep 17 00:00:00 2001 From: WilliButz Date: Sun, 10 Dec 2023 21:09:17 +0100 Subject: [PATCH] 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 --- flake.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 754007f..3f232c7 100644 --- a/flake.nix +++ b/flake.nix @@ -104,13 +104,15 @@ projectDir = authentik-src; python = pkgs.python311; 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 = []; checkGroups = []; - pyproject = pkgs.runCommandLocal "patched-pyproject.toml" {} '' - sed -e 's,tool.poetry.dev-dependencies,tool.poetry.group.dev.dependencies,' ${authentik-src}/pyproject.toml > $out - ''; + # workaround to remove dev-dependencies for the current combination of legacy pyproject.toml format + # 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 gopkgs = pkgs.buildGo121Module {