Fix authentik package for python3.12

This commit is contained in:
Dmitriy Kholkin 2024-01-27 18:00:27 +03:00
parent d03150dd46
commit 3424713a41
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2

View File

@ -1,41 +1,44 @@
From 274b4ab18950b22bd9d6e313a8238f24da685814 Mon Sep 17 00:00:00 2001 diff --git a/pkgs/by-name/au/authentik/ldap.nix b/pkgs/by-name/au/authentik/ldap.nix
From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= <supermanitu@gmail.com> new file mode 100644
Date: Mon, 20 Nov 2023 13:49:35 +0000 index 000000000000..7945c3021dfd
Subject: [PATCH 1/3] openapi-generator-cli: set meta.mainProgram --- /dev/null
+++ b/pkgs/by-name/au/authentik/ldap.nix
--- @@ -0,0 +1,18 @@
pkgs/tools/networking/openapi-generator-cli/default.nix | 1 + +{ lib, buildGoModule, authentik }:
1 file changed, 1 insertion(+) +
+buildGoModule {
diff --git a/pkgs/tools/networking/openapi-generator-cli/default.nix b/pkgs/tools/networking/openapi-generator-cli/default.nix + pname = "authentik-ldap-outpost";
index f557030f991d2e..c1d8172ca7926c 100644 + inherit (authentik) version src;
--- a/pkgs/tools/networking/openapi-generator-cli/default.nix +
+++ b/pkgs/tools/networking/openapi-generator-cli/default.nix + vendorHash = "sha256-8F9emmQmbe7R+xtGrjV5ht0adGasU6WAvLa8Wxr+j8M=";
@@ -33,6 +33,7 @@ let this = stdenv.mkDerivation rec { +
homepage = "https://github.com/OpenAPITools/openapi-generator"; + CGO_ENABLED = 0;
changelog = "https://github.com/OpenAPITools/openapi-generator/releases/tag/v${version}"; +
sourceProvenance = with sourceTypes; [ binaryBytecode ]; + subPackages = [ "cmd/ldap" ];
+ mainProgram = "openapi-generator-cli"; +
license = licenses.asl20; + meta = authentik.meta // {
maintainers = with maintainers; [ shou ]; + description = "The authentik ldap outpost. Needed for the extendal ldap API.";
}; + homepage = "https://goauthentik.io/docs/providers/ldap/";
+ mainProgram = "ldap";
From c4362996949240d5c4a535285b00745976be4be8 Mon Sep 17 00:00:00 2001 + };
From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= <supermanitu@gmail.com> +}
Date: Mon, 20 Nov 2023 13:50:12 +0000 diff --git a/pkgs/by-name/au/authentik/outposts.nix b/pkgs/by-name/au/authentik/outposts.nix
Subject: [PATCH 2/3] authentik: init at 2023.10.6 new file mode 100644
index 000000000000..05649628b3e8
--- --- /dev/null
pkgs/by-name/au/authentik/package.nix | 246 ++++++++++++++++++++++++++ +++ b/pkgs/by-name/au/authentik/outposts.nix
1 file changed, 246 insertions(+) @@ -0,0 +1,5 @@
create mode 100644 pkgs/by-name/au/authentik/package.nix +{ callPackage }:
+
+{
+ ldap = callPackage ./ldap.nix { };
+}
diff --git a/pkgs/by-name/au/authentik/package.nix b/pkgs/by-name/au/authentik/package.nix diff --git a/pkgs/by-name/au/authentik/package.nix b/pkgs/by-name/au/authentik/package.nix
new file mode 100644 new file mode 100644
index 00000000000000..cef6ef210547ce index 000000000000..8fca47e7ec28
--- /dev/null --- /dev/null
+++ b/pkgs/by-name/au/authentik/package.nix +++ b/pkgs/by-name/au/authentik/package.nix
@@ -0,0 +1,246 @@ @@ -0,0 +1,248 @@
+{ lib +{ lib
+, stdenvNoCC +, stdenvNoCC
+, fetchFromGitHub +, fetchFromGitHub
@ -144,6 +147,8 @@ index 00000000000000..cef6ef210547ce
+ --replace 'Path(__file__).absolute().parent.parent.parent' "\"$out\"" + --replace 'Path(__file__).absolute().parent.parent.parent' "\"$out\""
+ substituteInPlace authentik/lib/default.yml \ + substituteInPlace authentik/lib/default.yml \
+ --replace '/blueprints' "$out/blueprints" + --replace '/blueprints' "$out/blueprints"
+ sed -i '/dumb-init/d' pyproject.toml
+ sed -i '/djangorestframework-guardian/d' pyproject.toml
+ ''; + '';
+ +
+ nativeBuildInputs = [ prev.poetry-core ]; + nativeBuildInputs = [ prev.poetry-core ];
@ -282,60 +287,23 @@ index 00000000000000..cef6ef210547ce
+ mainProgram = "ak"; + mainProgram = "ak";
+ }; + };
+} +}
diff --git a/pkgs/tools/networking/openapi-generator-cli/default.nix b/pkgs/tools/networking/openapi-generator-cli/default.nix
From 54baa29146853cca4a8acd4bf93bad59c573035f Mon Sep 17 00:00:00 2001 index 2edba9a26eb6..fed141f9c1e1 100644
From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= <supermanitu@gmail.com> --- a/pkgs/tools/networking/openapi-generator-cli/default.nix
Date: Sat, 2 Dec 2023 16:08:25 +0000 +++ b/pkgs/tools/networking/openapi-generator-cli/default.nix
Subject: [PATCH 3/3] authentik: Add ldap outpost @@ -33,6 +33,7 @@ let this = stdenv.mkDerivation rec {
homepage = "https://github.com/OpenAPITools/openapi-generator";
--- changelog = "https://github.com/OpenAPITools/openapi-generator/releases/tag/v${version}";
pkgs/by-name/au/authentik/ldap.nix | 18 ++++++++++++++++++ sourceProvenance = with sourceTypes; [ binaryBytecode ];
pkgs/by-name/au/authentik/outposts.nix | 5 +++++ + mainProgram = "openapi-generator-cli";
pkgs/top-level/all-packages.nix | 2 ++ license = licenses.asl20;
3 files changed, 25 insertions(+) maintainers = with maintainers; [ shou ];
create mode 100644 pkgs/by-name/au/authentik/ldap.nix };
create mode 100644 pkgs/by-name/au/authentik/outposts.nix
diff --git a/pkgs/by-name/au/authentik/ldap.nix b/pkgs/by-name/au/authentik/ldap.nix
new file mode 100644
index 00000000000000..7945c3021dfd90
--- /dev/null
+++ b/pkgs/by-name/au/authentik/ldap.nix
@@ -0,0 +1,18 @@
+{ lib, buildGoModule, authentik }:
+
+buildGoModule {
+ pname = "authentik-ldap-outpost";
+ inherit (authentik) version src;
+
+ vendorHash = "sha256-8F9emmQmbe7R+xtGrjV5ht0adGasU6WAvLa8Wxr+j8M=";
+
+ CGO_ENABLED = 0;
+
+ subPackages = [ "cmd/ldap" ];
+
+ meta = authentik.meta // {
+ description = "The authentik ldap outpost. Needed for the extendal ldap API.";
+ homepage = "https://goauthentik.io/docs/providers/ldap/";
+ mainProgram = "ldap";
+ };
+}
diff --git a/pkgs/by-name/au/authentik/outposts.nix b/pkgs/by-name/au/authentik/outposts.nix
new file mode 100644
index 00000000000000..05649628b3e8e6
--- /dev/null
+++ b/pkgs/by-name/au/authentik/outposts.nix
@@ -0,0 +1,5 @@
+{ callPackage }:
+
+{
+ ldap = callPackage ./ldap.nix { };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e59de08224d3df..756ad8582a25ed 100644 index e0ca2d741d53..20687cbb509a 100644
--- a/pkgs/top-level/all-packages.nix --- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix
@@ -3377,6 +3377,8 @@ with pkgs; @@ -3374,6 +3374,8 @@ with pkgs;
authelia = callPackage ../servers/authelia { }; authelia = callPackage ../servers/authelia { };