diff options
author | V <v@anomalous.eu> | 2021-01-21 01:07:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 19:07:16 -0500 |
commit | 7616206b7747f12db15d32a7ab16b0ceaa3d7331 (patch) | |
tree | b7cc1797a713439c41209f3e744a336420d6657d /doc/languages-frameworks/r.section.md | |
parent | 77403c1c19f9e9c5f8ba9bb24f83c07eace126b2 (diff) | |
download | nixpkgs-7616206b7747f12db15d32a7ab16b0ceaa3d7331.tar nixpkgs-7616206b7747f12db15d32a7ab16b0ceaa3d7331.tar.gz nixpkgs-7616206b7747f12db15d32a7ab16b0ceaa3d7331.tar.bz2 nixpkgs-7616206b7747f12db15d32a7ab16b0ceaa3d7331.tar.lz nixpkgs-7616206b7747f12db15d32a7ab16b0ceaa3d7331.tar.xz nixpkgs-7616206b7747f12db15d32a7ab16b0ceaa3d7331.tar.zst nixpkgs-7616206b7747f12db15d32a7ab16b0ceaa3d7331.zip |
doc: add function argument order convention (#110060)
* doc: add function argument order convention Ordering by usage is the de facto ordering given to arguments. It's logical, and makes finding argument usage easier. Putting lib first is common in NixOS modules, so it's reasonable to mirror this in nixpkgs proper. Additionally, it's not a package as such, has zero dependencies, and can be found used anywhere in a derivation. * doc: clean up usage of lib
Diffstat (limited to 'doc/languages-frameworks/r.section.md')
-rw-r--r-- | doc/languages-frameworks/r.section.md | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/doc/languages-frameworks/r.section.md b/doc/languages-frameworks/r.section.md index 32a39ade279..c420d112c91 100644 --- a/doc/languages-frameworks/r.section.md +++ b/doc/languages-frameworks/r.section.md @@ -32,14 +32,12 @@ However, if you'd like to add a file to your project source to make the environment available for other contributors, you can create a `default.nix` file like so: ```nix -let - pkgs = import <nixpkgs> {}; - stdenv = pkgs.stdenv; -in with pkgs; { +with import <nixpkgs> {}; +{ myProject = stdenv.mkDerivation { name = "myProject"; version = "1"; - src = if pkgs.lib.inNixShell then null else nix; + src = if lib.inNixShell then null else nix; buildInputs = with rPackages; [ R |