From 0fdc9962a0bfec758203d979af87149a48e10345 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 24 Sep 2024 17:51:23 +0100 Subject: [PATCH] nexusmods-app: add a warning about its experimental state Users need to be aware that the app is experimental. In particular, they must take manual action before updating the package. The warning can be suppressed using `iKnowItsExperimental = true`. --- pkgs/by-name/ne/nexusmods-app/package.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ne/nexusmods-app/package.nix b/pkgs/by-name/ne/nexusmods-app/package.nix index 7e2414794f215..a3c32dd9dfe3e 100644 --- a/pkgs/by-name/ne/nexusmods-app/package.nix +++ b/pkgs/by-name/ne/nexusmods-app/package.nix @@ -9,8 +9,28 @@ lib, runCommand, pname ? "nexusmods-app", + iKnowItsExperimental ? false, }: -buildDotnetModule (finalAttrs: { +let + # TODO: Remove this warning once upstream stabilises + warningText = '' + `${pname}` is currently in an unstable and experimental state. + In particular, you will usually need to wipe its config & reset any modded games whenever this package updates. + This can normally be done by running `NexusMods.App uninstall-app` before updating. + + See the upstream FAQ for more detail: + https://nexus-mods.github.io/NexusMods.App/users/faq/#why-do-i-have-to-uninstall-everything-to-update-the-app + + Note: You can silence this warning by overriding the package: + pkgs.${pname}.override { + iKnowItsExperimental = true; + } + ''; + + # Use a wrapper to avoid unnecessary indentation changes when we eventually remove the warning + withWarning = fn: arg: lib.warnIfNot iKnowItsExperimental warningText (fn arg); +in +withWarning buildDotnetModule (finalAttrs: { inherit pname; version = "0.4.1";