lib: Document status of deprecated.nix and move it

This is all I could find after co-maintaining lib for a long time.
I've had the fortune of basically not really noticing this file,
because it has had very few interactions until the confusion in
https://github.com/NixOS/nixpkgs/pull/304277

It seems to be a state of limbo, which would be nice to resolve
(with great care), but this is not urgent, and first we should
document its status.

+12 -1
+1 -1
lib/default.nix
··· 47 47 # misc 48 48 asserts = callLibs ./asserts.nix; 49 49 debug = callLibs ./debug.nix; 50 - misc = callLibs ./deprecated.nix; 50 + misc = callLibs ./deprecated/misc.nix; 51 51 52 52 # domain-specific 53 53 fetchers = callLibs ./fetchers.nix;
lib/deprecated.nix lib/deprecated/misc.nix
+11
lib/deprecated/README.md
··· 1 + 2 + # lib/deprecated 3 + 4 + Do not add any new functions to this directory. 5 + 6 + This directory contains the `lib.misc` sublibrary, which - as a location - is deprecated. 7 + Furthermore, some of the functions inside are of *dubious* utility, and should perhaps be avoided, 8 + while some functions *may still be needed*. 9 + 10 + This directory does not play a role in the deprecation process for library functions. 11 + They should be deprecated in place, by putting a `lib.warn` or `lib.warnIf` call around the function.