about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/coding-conventions.xml27
-rw-r--r--doc/languages-frameworks/python.md3
-rw-r--r--doc/languages-frameworks/rust.md13
3 files changed, 32 insertions, 11 deletions
diff --git a/doc/coding-conventions.xml b/doc/coding-conventions.xml
index 0776e70f14e10..765fc56c3bb3c 100644
--- a/doc/coding-conventions.xml
+++ b/doc/coding-conventions.xml
@@ -661,8 +661,6 @@ src = fetchFromGitHub {
 </section>
 
 <section xml:id="sec-patches"><title>Patches</title>
-  <para>Only patches that are unique to <literal>nixpkgs</literal> should be
-    included in <literal>nixpkgs</literal> source.</para>
   <para>Patches available online should be retrieved using
     <literal>fetchpatch</literal>.</para>
   <para>
@@ -676,5 +674,30 @@ patches = [
 ];
 </programlisting>
   </para>
+  <para>Otherwise, you can add a <literal>.patch</literal> file to the
+  <literal>nixpkgs</literal> repository. In the interest of keeping our
+  maintenance burden to a minimum, only patches that are unique
+  to <literal>nixpkgs</literal> should be added in this way.</para>
+<para><programlisting>
+patches = [ ./0001-changes.patch ];
+</programlisting></para>
+  <para>If you do need to do create this sort of patch file,
+  one way to do so is with git:
+  <orderedlist>
+    <listitem><para>Move to the root directory of the source code
+    you're patching.<screen>
+$ cd the/program/source</screen></para></listitem>
+    <listitem><para>If a git repository is not already present,
+    create one and stage all of the source files.<screen>
+$ git init
+$ git add .</screen></para></listitem>
+    <listitem><para>Edit some files to make whatever changes need
+    to be included in the patch.</para></listitem>
+    <listitem><para>Use git to create a diff, and pipe the output
+    to a patch file:<screen>
+$ git diff > nixpkgs/pkgs/the/package/0001-changes.patch</screen>
+    </para></listitem>
+  </orderedlist></para>
 </section>
+
 </chapter>
diff --git a/doc/languages-frameworks/python.md b/doc/languages-frameworks/python.md
index cf81b240ceac2..9172d71221394 100644
--- a/doc/languages-frameworks/python.md
+++ b/doc/languages-frameworks/python.md
@@ -530,7 +530,6 @@ Based on the packages defined in `pkgs/top-level/python-packages.nix` an
 attribute set is created for each available Python interpreter. The available
 sets are
 
-* `pkgs.python26Packages`
 * `pkgs.python27Packages`
 * `pkgs.python34Packages`
 * `pkgs.python35Packages`
@@ -540,7 +539,7 @@ sets are
 and the aliases
 
 * `pkgs.python2Packages` pointing to `pkgs.python27Packages`
-* `pkgs.python3Packages` pointing to `pkgs.python35Packages`
+* `pkgs.python3Packages` pointing to `pkgs.python36Packages`
 * `pkgs.pythonPackages` pointing to `pkgs.python2Packages`
 
 #### `buildPythonPackage` function
diff --git a/doc/languages-frameworks/rust.md b/doc/languages-frameworks/rust.md
index 276b5496fbb8a..bedda76a30665 100644
--- a/doc/languages-frameworks/rust.md
+++ b/doc/languages-frameworks/rust.md
@@ -9,11 +9,12 @@ date: 2017-03-05
 To install the rust compiler and cargo put
 
 ```
-rust
+rustc
+cargo
 ```
 
 into the `environment.systemPackages` or bring them into
-scope with `nix-shell -p rust`.
+scope with `nix-shell -p rustc cargo`.
 
 For daily builds (beta and nightly) use either rustup from
 nixpkgs or use the [Rust nightlies
@@ -24,9 +25,7 @@ overlay](#using-the-rust-nightlies-overlay).
 Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
 
 ```
-with rustPlatform;
-
-buildRustPackage rec {
+rustPlatform.buildRustPackage rec {
   name = "ripgrep-${version}";
   version = "0.4.0";
 
@@ -40,9 +39,9 @@ buildRustPackage rec {
   cargoSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx";
 
   meta = with stdenv.lib; {
-    description = "A utility that combines the usability of The Silver Searcher with the raw speed of grep";
+    description = "A fast line-oriented regex search tool, similar to ag and ack";
     homepage = https://github.com/BurntSushi/ripgrep;
-    license = with licenses; [ unlicense ];
+    license = licenses.unlicense;
     maintainers = [ maintainers.tailhook ];
     platforms = platforms.all;
   };