From f77be466ad3f7166cb9159fe3f07f417242283de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= Date: Fri, 2 May 2025 18:42:55 +0100 Subject: [PATCH 1/2] python3Packages.python-kadmin-rs: 0.5.3 -> 0.6.0 --- .../development/python-modules/python-kadmin-rs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/python-kadmin-rs/default.nix b/pkgs/development/python-modules/python-kadmin-rs/default.nix index f7cd9f0e3980..c28412da0068 100644 --- a/pkgs/development/python-modules/python-kadmin-rs/default.nix +++ b/pkgs/development/python-modules/python-kadmin-rs/default.nix @@ -17,19 +17,19 @@ buildPythonPackage rec { pname = "python-kadmin-rs"; - version = "0.5.3"; + version = "0.6.0"; pyproject = true; src = fetchFromGitHub { owner = "authentik-community"; repo = "kadmin-rs"; rev = "kadmin/version/${version}"; - hash = "sha256-JK1BwPtIdfp6fleEPyRxMBCFP2njtQebr/Wt+Dc9CYs="; + hash = "sha256-dtHLhiUjFqINrkIcx72tIRnaWEl15iA/q7DJ28/gPJk="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit src; - hash = "sha256-9LCtsX3fuRXCHu5Gd+7OB5JQZ0h6KjSOSan83KUivLQ="; + hash = "sha256-E/AQrhLsp86cBWz6SOukA1hbpuTogkFzDXlbH+tpInQ="; }; buildInputs = [ From 844e819cca2e5a93add5cd5a610c91c5273c0f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= Date: Fri, 2 May 2025 18:43:29 +0100 Subject: [PATCH 2/2] authentik,authentik.outposts.{ldap,radius,proxy}: 2025.2.3 -> 2025.4.1 --- pkgs/by-name/au/authentik/ldap.nix | 2 +- pkgs/by-name/au/authentik/package.nix | 56 ++++++++++++++++++--------- pkgs/by-name/au/authentik/proxy.nix | 2 +- pkgs/by-name/au/authentik/radius.nix | 2 +- 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/au/authentik/ldap.nix b/pkgs/by-name/au/authentik/ldap.nix index 5b692d092b10..e3b1bfab8174 100644 --- a/pkgs/by-name/au/authentik/ldap.nix +++ b/pkgs/by-name/au/authentik/ldap.nix @@ -7,7 +7,7 @@ buildGoModule { pname = "authentik-ldap-outpost"; inherit (authentik) version src; - vendorHash = "sha256-aG/VqpmHJeGyF98aS0jgwEAq1R5c8VggeJxLWS9W8HY="; + vendorHash = "sha256-cEB22KFDONcJBq/FvLpYKN7Zd06mh8SACvCSuj5i4fI="; env.CGO_ENABLED = 0; diff --git a/pkgs/by-name/au/authentik/package.nix b/pkgs/by-name/au/authentik/package.nix index c8c7410d8d4c..1d7420598522 100644 --- a/pkgs/by-name/au/authentik/package.nix +++ b/pkgs/by-name/au/authentik/package.nix @@ -16,13 +16,13 @@ }: let - version = "2025.2.3"; + version = "2025.4.1"; src = fetchFromGitHub { owner = "goauthentik"; repo = "authentik"; rev = "version/${version}"; - hash = "sha256-aaSAlFIc5Gn5PJPVuObi24Y86/3N3yFJVQTx1tV2i2A="; + hash = "sha256-idShMSYIrf3ViG9VFNGNu6TSjBz3Q+GJMMeCzcJwfG4="; }; meta = with lib; { @@ -45,7 +45,7 @@ let sourceRoot = "source/website"; - outputHash = "sha256-lPpphGi8l2X/fR9YoJv37piAe82oqSLAKHze8oTrGNc="; + outputHash = "sha256-AnQpjCoCTzm28Wl/t3YHx0Kl0CuMHL2OgRjRB1Trrsw="; outputHashMode = "recursive"; nativeBuildInputs = [ @@ -55,7 +55,7 @@ let buildPhase = '' npm ci --cache ./cache - rm -r ./cache node_modules/@parcel/watcher-linux-* node_modules/.package-lock.json + rm -r ./cache node_modules/.package-lock.json ''; installPhase = '' @@ -131,7 +131,7 @@ let ln -s ${src}/website $out/ ln -s ${clientapi} $out/web/node_modules/@goauthentik/api ''; - npmDepsHash = "sha256-uVur1DyXaIGPny7u/JQyx9HQ7VJqeSi2pPSORZgLjEw="; + npmDepsHash = "sha256-i95sH+KUgAQ76cv1+7AE/UA6jsReQMttDGWClNE2Ol4="; postPatch = '' cd web @@ -159,28 +159,31 @@ let python = python312.override { self = python; packageOverrides = final: prev: { + django = final.django_5; + django-tenants = prev.django-tenants.overrideAttrs { - version = "3.6.1-unstable-2024-01-11"; + version = "3.7.0-unstable-2025-03-14"; src = fetchFromGitHub { owner = "rissson"; repo = "django-tenants"; - rev = "a7f37c53f62f355a00142473ff1e3451bb794eca"; - hash = "sha256-YBT0kcCfETXZe0j7/f1YipNIuRrcppRVh1ecFS3cvNo="; + rev = "156e53a6f5902d74b73dd9d0192fffaa2587a740"; + hash = "sha256-xmhfPgCmcFr5axVV65fCq/AcV8ApRVvFVEpq3cQSVqo="; }; }; - # Use 3.14.0 until https://github.com/encode/django-rest-framework/issues/9358 is fixed. - # Otherwise applying blueprints/default/default-brand.yaml fails with: - # authentik.flows.models.RelatedObjectDoesNotExist: FlowStageBinding has no target. - djangorestframework = prev.buildPythonPackage rec { + + # Running authentik currently requires a custom version. + # Look in `pyproject.toml` for changes to the rev in the `[tool.uv.sources]` section. + # See https://github.com/goauthentik/authentik/pull/14057 for latest version bump. + djangorestframework = prev.buildPythonPackage { pname = "djangorestframework"; - version = "3.14.0"; + version = "3.16.0"; format = "setuptools"; src = fetchFromGitHub { - owner = "encode"; + owner = "authentik-community"; repo = "django-rest-framework"; - rev = version; - hash = "sha256-Fnj0n3NS3SetOlwSmGkLE979vNJnYE6i6xwVBslpNz4="; + rev = "896722bab969fabc74a08b827da59409cf9f1a4e"; + hash = "sha256-YrEDEU3qtw/iyQM3CoB8wYx57zuPNXiJx6ZjrIwnCNU="; }; propagatedBuildInputs = with final; [ @@ -195,10 +198,19 @@ let # optional tests coreapi django-guardian + inflection pyyaml uritemplate ]; + disabledTests = [ + "test_ignore_validation_for_unchanged_fields" + "test_invalid_inputs" + "test_shell_code_example_rendering" + "test_unique_together_condition" + "test_unique_together_with_source" + ]; + pythonImportsCheck = [ "rest_framework" ]; }; @@ -215,14 +227,19 @@ let --replace-fail '/blueprints' "$out/blueprints" \ --replace-fail './media' '/var/lib/authentik/media' substituteInPlace pyproject.toml \ - --replace-fail 'dumb-init = "*"' "" \ + --replace-fail '"dumb-init",' "" \ --replace-fail 'djangorestframework-guardian' 'djangorestframework-guardian2' substituteInPlace authentik/stages/email/utils.py \ --replace-fail 'web/' '${webui}/' ''; nativeBuildInputs = [ - prev.poetry-core + prev.hatchling + prev.pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "xmlsec" ]; propagatedBuildInputs = @@ -298,6 +315,7 @@ let ++ django-storages.optional-dependencies.s3 ++ opencontainers.optional-dependencies.reggie ++ psycopg.optional-dependencies.c + ++ psycopg.optional-dependencies.pool ++ uvicorn.optional-dependencies.standard; postInstall = '' @@ -330,7 +348,7 @@ let env.CGO_ENABLED = 0; - vendorHash = "sha256-aG/VqpmHJeGyF98aS0jgwEAq1R5c8VggeJxLWS9W8HY="; + vendorHash = "sha256-cEB22KFDONcJBq/FvLpYKN7Zd06mh8SACvCSuj5i4fI="; postInstall = '' mv $out/bin/server $out/bin/authentik diff --git a/pkgs/by-name/au/authentik/proxy.nix b/pkgs/by-name/au/authentik/proxy.nix index 610a3daa08b0..06f99c78eb2a 100644 --- a/pkgs/by-name/au/authentik/proxy.nix +++ b/pkgs/by-name/au/authentik/proxy.nix @@ -7,7 +7,7 @@ buildGoModule { pname = "authentik-proxy-outpost"; inherit (authentik) version src; - vendorHash = "sha256-aG/VqpmHJeGyF98aS0jgwEAq1R5c8VggeJxLWS9W8HY="; + vendorHash = "sha256-cEB22KFDONcJBq/FvLpYKN7Zd06mh8SACvCSuj5i4fI="; env.CGO_ENABLED = 0; diff --git a/pkgs/by-name/au/authentik/radius.nix b/pkgs/by-name/au/authentik/radius.nix index 51dd26d9dc44..a35259954d99 100644 --- a/pkgs/by-name/au/authentik/radius.nix +++ b/pkgs/by-name/au/authentik/radius.nix @@ -7,7 +7,7 @@ buildGoModule { pname = "authentik-radius-outpost"; inherit (authentik) version src; - vendorHash = "sha256-aG/VqpmHJeGyF98aS0jgwEAq1R5c8VggeJxLWS9W8HY="; + vendorHash = "sha256-cEB22KFDONcJBq/FvLpYKN7Zd06mh8SACvCSuj5i4fI="; env.CGO_ENABLED = 0;