From c06b2b3d671da4847f950e7e9041920b40eca0bf Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 9 Jan 2021 07:04:48 +0000 Subject: doc: add "prefer lib over stdenv.lib" convention I think we should have something in the manual people can point to about this, to avoid rehashing it over and over in PRs. "stdenv.lib" makes it look like lib is part of stdenv, which it isn't, and makes it even more confusing as a newcomer to figure out what stdenv is (and isn't). --- doc/contributing/coding-conventions.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/contributing') diff --git a/doc/contributing/coding-conventions.xml b/doc/contributing/coding-conventions.xml index e587275a638..cb6d60c2c13 100644 --- a/doc/contributing/coding-conventions.xml +++ b/doc/contributing/coding-conventions.xml @@ -178,6 +178,15 @@ args.stdenv.mkDerivation (args // { + + + Prefer using the top-level lib over its alias + stdenv.lib. lib is unrelated to + stdenv, and so stdenv.lib should only + be used as a convenience alias when developing to avoid having to modify + the function inputs just to test something out. + +
-- cgit 1.4.1