{ pkgs, src, ... }: let app = pkgs.poetry2nix.mkPoetryApplication { projectDir = src; python = pkgs.python310; overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: { click-didyoumean = super.click-didyoumean.overridePythonAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ self.poetry ]; }); xmlsec = super.xmlsec.overridePythonAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ self.pkgconfig pkgs.pkg-config ]; buildInputs = (old.buildInputs or []) ++ [ pkgs.xmlsec pkgs.libxslt pkgs.libxml2 pkgs.libtool ]; }); }); buildInputs = [ pkgs.bash ]; postInstall = '' mkdir -p $out/share/authentik touch $out/share/authentik/__init__.py cp -r ${src}/xml $out/share/authentik/xml cp -r ${src}/lifecycle $out/share/authentik/lifecycle wrapProgram $out/bin/ak \ --prefix PYTHONPATH ':' "$out/share/authentik" ''; }; in app.dependencyEnv