3
0
Fork 0
forked from mirrors/nixpkgs

doc/contributing: add unnecessary string conversions

This commit is contained in:
Sandro 2021-04-30 11:31:48 +02:00 committed by GitHub
parent 71b873942e
commit 08ab1d9572
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,6 +169,18 @@
})
```
- Unnecessary string conversions should be avoided. Do
```nix
rev = version;
```
instead of
```nix
rev = "${version}";
```
- Arguments should be listed in the order they are used, with the exception of `lib`, which always goes first.
- 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.