From 84fed676e415431ab5b62c9e0ac09776313de25d Mon Sep 17 00:00:00 2001 From: Finn Landweber Date: Thu, 23 May 2024 10:55:12 +0200 Subject: [PATCH] Add info when init with cached Nixpkgs (#402) https://github.com/nmattia/niv/issues/384 --- src/Niv/Cli.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Niv/Cli.hs b/src/Niv/Cli.hs index d59ec81..509e122 100644 --- a/src/Niv/Cli.hs +++ b/src/Niv/Cli.hs @@ -230,6 +230,15 @@ cmdInit nixpkgs = do tbold (T.pack fp) <> "." ] ] + case nixpkgs of + NixpkgsFast -> + tsay $ + T.unlines + [ "", + tbold (tblue "INFO: ") <> "`niv init` didn't fetch the latest commit for nixpkgs (due to --fast).", + " Run `niv update nixpkgs` if you wish to pin the latest." + ] + _ -> pure () where createFile :: FilePath -> B.ByteString -> NIO () createFile path content = li $ do