From 929dd649d08ade98dec295fe7cf2542d4d5c5949 Mon Sep 17 00:00:00 2001 From: DerGrumpf Date: Tue, 9 Jun 2026 11:26:08 +0200 Subject: [PATCH] oidcwarden: init at 2026.4.2-1 --- pkgs/by-name/oi/oidcwarden/package.nix | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/oi/oidcwarden/package.nix diff --git a/pkgs/by-name/oi/oidcwarden/package.nix b/pkgs/by-name/oi/oidcwarden/package.nix new file mode 100644 index 000000000000..f621dc918500 --- /dev/null +++ b/pkgs/by-name/oi/oidcwarden/package.nix @@ -0,0 +1,47 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + openssl, + libiconv, + stdenv, + dbBackend ? "sqlite", + libmysqlclient, + libpq, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "oidcwarden"; + version = "2026.4.2-1"; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "Timshel"; + repo = "OIDCWarden"; + tag = "v${finalAttrs.version}"; + hash = "sha256-tHacn9RtoByWpqnWX2/gWwODDSeXJa4mk4MfxHiiJ8A="; + }; + + cargoHash = "sha256-eGsYNaLYRCrTRaoyfhxnoeA2ytYeyGGvHnAbpEIayzs="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ + openssl + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] + ++ lib.optional (dbBackend == "mysql") libmysqlclient + ++ lib.optional (dbBackend == "postgresql") libpq; + + buildFeatures = dbBackend; + + meta = { + description = "Unofficial Bitwarden-compatible server with OpenID Connect support"; + homepage = "https://github.com/Timshel/OIDCWarden"; + changelog = "https://github.com/Timshel/OIDCWarden/releases/tag/v${finalAttrs.src.tag}"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ DerGrumpf ]; + mainProgram = "oidcwarden"; + }; +})