From 22eb1cb5da690f89ae83f3e15e930796f536da19 Mon Sep 17 00:00:00 2001 From: Bryan Gardiner Date: Tue, 24 Sep 2024 17:43:16 -0700 Subject: [PATCH] Warn users who pull from git master about the upcoming sr.ht migration. --- default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 7cb3705..26a7da6 100644 --- a/default.nix +++ b/default.nix @@ -1,7 +1,21 @@ -{ pkgs ? import {} }: +{ pkgs ? import {} +, silenceWarning ? false +}: let inherit (pkgs) lib nix-gitignore python3 stdenv; + + warning = + "This is a development build of nvd from git master.\n" + + "On or around Oct 19, 2024, nvd will be moving to Sourcehut.\n" + + "Please consider using the latest stable nvd release from nixpkgs,\n" + + "but if you wish to continue pulling the latest unstable pre-release\n" + + "code, you will need to update your URLs (and can do so now).\n" + + "See the following link for more info, thanks.\n\n" + + "https://gitlab.com/khumba/nvd/-/issues/19"; + + warn = if silenceWarning then lib.id else lib.warn warning; in +warn ( stdenv.mkDerivation { pname = "nvd"; version = "0.2.4"; @@ -31,3 +45,4 @@ stdenv.mkDerivation { platforms = lib.platforms.all; }; } +)