From 28b018d923632b4eb9be1850e19f66ada476aa03 Mon Sep 17 00:00:00 2001 From: Leona Maroni Date: Wed, 29 Oct 2025 19:58:35 +0100 Subject: [PATCH] discourse.mkDiscoursePlugin: allow overriding pluginName MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit discourse.plugins.discourse-ldap-auth has the interesting situation that it – as only package – only has `ldap` as name and not prefixed with `discourse-`. I feel like having a `ldap` derivation without further context is bad, so I went this way. --- pkgs/servers/web-apps/discourse/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix index ce34806e2a80..85d0212e8118 100644 --- a/pkgs/servers/web-apps/discourse/default.nix +++ b/pkgs/servers/web-apps/discourse/default.nix @@ -122,9 +122,12 @@ let ); in stdenv.mkDerivation ( - removeAttrs args [ "bundlerEnvArgs" ] - // { + # Allow overriding the plugin name + { pluginName = if name != null then name else "${pname}-${version}"; + } + // removeAttrs args [ "bundlerEnvArgs" ] + // { dontConfigure = true; dontBuild = true; installPhase = ''