From 4bae1b3222690f59b6ed582fafe3a0f871add39d Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Thu, 23 Nov 2023 06:27:20 +0000 Subject: [PATCH] treewide: use lib.warnIf instead of improvised alternatives --- pkgs/servers/atlassian/confluence.nix | 8 +------- pkgs/servers/atlassian/crowd.nix | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/pkgs/servers/atlassian/confluence.nix b/pkgs/servers/atlassian/confluence.nix index b6af64e984e7..b7196709b422 100644 --- a/pkgs/servers/atlassian/confluence.nix +++ b/pkgs/servers/atlassian/confluence.nix @@ -6,13 +6,7 @@ assert withMysql -> (mysql_jdbc != null); -let - optionalWarning = cond: msg: - if cond then lib.warn msg - else lib.id; -in - -optionalWarning (crowdProperties != null) "Using `crowdProperties` is deprecated!" +lib.warnIf (crowdProperties != null) "Using `crowdProperties` is deprecated!" (stdenvNoCC.mkDerivation rec { pname = "atlassian-confluence"; version = "7.19.14"; diff --git a/pkgs/servers/atlassian/crowd.nix b/pkgs/servers/atlassian/crowd.nix index 4544ea56ff21..6c87e3c07115 100644 --- a/pkgs/servers/atlassian/crowd.nix +++ b/pkgs/servers/atlassian/crowd.nix @@ -1,13 +1,7 @@ { lib, stdenv, fetchurl, home ? "/var/lib/crowd" , port ? 8092, proxyUrl ? null, openidPassword ? "WILL_NEVER_BE_SET" }: -let - optionalWarning = cond: msg: - if cond then lib.warn msg - else lib.id; -in - -optionalWarning (openidPassword != "WILL_NEVER_BE_SET") "Using `crowdProperties` is deprecated!" +lib.warnIf (openidPassword != "WILL_NEVER_BE_SET") "Using `crowdProperties` is deprecated!" (stdenv.mkDerivation rec { pname = "atlassian-crowd"; version = "5.0.1";