From 2c8ab01aa8b5601fd4eb1085c161c0f8bace27aa Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 2 Apr 2023 12:06:56 +0000 Subject: [PATCH] authentik: update --- nix/pkgs/authentik/pythonapp/default.nix | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/nix/pkgs/authentik/pythonapp/default.nix b/nix/pkgs/authentik/pythonapp/default.nix index 3a5f29665a..8c9bb840fd 100644 --- a/nix/pkgs/authentik/pythonapp/default.nix +++ b/nix/pkgs/authentik/pythonapp/default.nix @@ -1,4 +1,4 @@ -{ depot, src, pkgs, ... }: +{ depot, src, pkgs, lib, ... }: let inherit (pkgs) poetry2nix; @@ -19,7 +19,9 @@ let app = poetry2nix.mkPoetryApplication rec { projectDir = fixedSrc; python = pkgs.python311; - overrides = poetry2nix.overrides.withDefaults (self: super: { + overrides = let + assertVersion = pkg: wantVersion: lib.assertMsg (pkg.version == wantVersion) "${pkg.pname} (${pkg.version}) is different to what I expected (${wantVersion}); maybe remove the override?"; + in poetry2nix.overrides.withDefaults (self: super: { cython = super.cython.overridePythonAttrs (oldAttrs: rec { version = "0.29.33"; src = self.fetchPypi { @@ -58,10 +60,18 @@ let }); watchfiles = self.callPackage ../../../../third_party/nixpkgs/pkgs/development/python-modules/watchfiles/default.nix { CoreServices = null; }; - cryptography = super.cryptography.overridePythonAttrs (old: { - cargoDeps = old.cargoDeps.overrideAttrs ({ outputHash, ... }: { - outputHash = "01wylp2zv4bxg77jmklz2lfac8hir23vk5aa44r3373kl8i8l7yk"; - }); + kombu = assert assertVersion super.kombu "5.2.4"; super.kombu.overridePythonAttrs (old: { + buildInputs = (old.buildInputs or []) ++ [ self.setuptools ]; + postPatch = '' + ${old.postPatch or ""} + substituteInPlace requirements/test.txt --replace "pytz>dev" "pytz" + ''; + }); + isort = assert assertVersion super.isort "5.10.1"; super.isort.overridePythonAttrs (old: { + postPatch = '' + ${old.postPatch or ""} + substituteInPlace pyproject.toml --replace "pip-shims<=0.3.4" "pip-shims" + ''; }); });