From 71317162c50df91d421eacdf87d50b4ba6d37635 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Tue, 20 Jun 2023 13:44:04 +0200 Subject: [PATCH 1/4] use more self-descriptive section headings --- doc/manual/src/contributing/hacking.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/doc/manual/src/contributing/hacking.md b/doc/manual/src/contributing/hacking.md index c57d45138..12b91c79e 100644 --- a/doc/manual/src/contributing/hacking.md +++ b/doc/manual/src/contributing/hacking.md @@ -12,14 +12,15 @@ The following instructions assume you already have some version of Nix installed [installation instructions]: ../installation/installation.md -## Nix with flakes +## Building Nix with flakes -This section assumes you are using Nix with [flakes] enabled. See the [next section](#classic-nix) for equivalent instructions which don't require flakes. +This section assumes you are using Nix with the [`flakes`] and [`nix-command`] experimental features enabled. +See the [Building Nix](#building-nix) section for equivalent instructions using stable Nix interfaces. -[flakes]: ../command-ref/new-cli/nix3-flake.md#description +[`flakes`]: @docroot@/contributing/experimental-features.md#xp-feature-flakes +[`nix-command`]: @docroot@/contributing/experimental-features.md#xp-nix-command -To build all dependencies and start a shell in which all environment -variables are set up so that those dependencies can be found: +To build all dependencies and start a shell in which all environment variables are set up so that those dependencies can be found: ```console $ nix develop @@ -55,7 +56,7 @@ To install it in `$(pwd)/outputs` and test it: nix (Nix) 2.12 ``` -To build a release version of Nix: +To build a release version of Nix for the current operating system and CPU architecture: ```console $ nix build @@ -63,12 +64,9 @@ $ nix build You can also build Nix for one of the [supported target platforms](#target-platforms). -## Classic Nix +## Building Nix -This section is for Nix without [flakes]. - -To build all dependencies and start a shell in which all environment -variables are set up so that those dependencies can be found: +To build all dependencies and start a shell in which all environment variables are set up so that those dependencies can be found: ```console $ nix-shell @@ -102,7 +100,7 @@ To install it in `$(pwd)/outputs` and test it: nix (Nix) 2.12 ``` -To build Nix for the current operating system and CPU architecture use +To build a release version of Nix for the current operating system and CPU architecture: ```console $ nix-build From a78f929065fd209e3d89853c6beb48942e3820e9 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Tue, 20 Jun 2023 12:39:07 +0200 Subject: [PATCH 2/4] fix anchor link --- doc/manual/src/contributing/hacking.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/manual/src/contributing/hacking.md b/doc/manual/src/contributing/hacking.md index 12b91c79e..310d69310 100644 --- a/doc/manual/src/contributing/hacking.md +++ b/doc/manual/src/contributing/hacking.md @@ -62,7 +62,7 @@ To build a release version of Nix for the current operating system and CPU archi $ nix build ``` -You can also build Nix for one of the [supported target platforms](#target-platforms). +You can also build Nix for one of the [supported target platforms](#platforms). ## Building Nix @@ -106,7 +106,7 @@ To build a release version of Nix for the current operating system and CPU archi $ nix-build ``` -You can also build Nix for one of the [supported target platforms](#target-platforms). +You can also build Nix for one of the [supported target platforms](#platforms). ## Platforms From 085104944b2957f4269fcbfaf0d1874ab0c9ce84 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Wed, 21 Jun 2023 09:46:23 +0200 Subject: [PATCH 3/4] add redirects to changed anchors --- doc/manual/redirects.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/manual/redirects.js b/doc/manual/redirects.js index 5cd6fdea2..6813dc6d6 100644 --- a/doc/manual/redirects.js +++ b/doc/manual/redirects.js @@ -342,6 +342,10 @@ const redirects = { "installation/installing-binary.html": { "uninstalling": "uninstall.html" } + "contributing/hacking.html": { + "nix-with-flakes": "#building-nix-with-flakes" + "classic-nix": "#building-nix" + } }; // the following code matches the current page's URL against the set of redirects. From 5f9a921bc1e6d3e6bf65601be565585cf0190e8f Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Wed, 21 Jun 2023 14:31:09 +0200 Subject: [PATCH 4/4] do not use "target", as it's a loaded term in the domain of compilers Co-authored-by: Robert Hensing --- doc/manual/src/contributing/hacking.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/manual/src/contributing/hacking.md b/doc/manual/src/contributing/hacking.md index 310d69310..6c6f2eb52 100644 --- a/doc/manual/src/contributing/hacking.md +++ b/doc/manual/src/contributing/hacking.md @@ -62,7 +62,7 @@ To build a release version of Nix for the current operating system and CPU archi $ nix build ``` -You can also build Nix for one of the [supported target platforms](#platforms). +You can also build Nix for one of the [supported platforms](#platforms). ## Building Nix @@ -106,7 +106,7 @@ To build a release version of Nix for the current operating system and CPU archi $ nix-build ``` -You can also build Nix for one of the [supported target platforms](#platforms). +You can also build Nix for one of the [supported platforms](#platforms). ## Platforms