From 9ae6c3f97af2bba8964f3f3b332c2999e173bf53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Sat, 13 Sep 2025 14:50:23 +0100 Subject: [PATCH] temp --- index.html | 16 +++++++++------- source/recipes/devshell/nix-non-flake/main.adoc0 | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 1e292dd..e8c9b7f 100644 --- a/index.html +++ b/index.html @@ -4738,10 +4738,10 @@ However, you can use any of the flake reference styles defined in repo provides a default.nix. If the derivation in that file allows us to supply our own package set, then our flake can call it to build hello nix. -If instead it requires nixpkgs, it is not pure and we cannot use it.

+If instead it requires <nixpkgs>, it is not pure and we cannot use it.

-

If the file begins with an expression such as

+

For example, if the file begins with an expression such as

@@ -4761,7 +4761,9 @@ Instead, we have to write our own derivation (see Sec
-

so we can call it, passing our own package set as an argument (see Section 10.4.6.1, “If the nix derivation does not require nixpkgs”).

+

then it accepts a package set as an argument, +only using <nixpkgs> if no argument is provided. +We can use it directly to build hello-nix (see Section 10.4.6.1, “If the nix derivation does not require nixpkgs”).

If the nix derivation does not require nixpkgs
@@ -4825,9 +4827,9 @@ Instead, we have to write our own derivation (see Sec
-

Lines ??? fetches the git repo for hello-nix. +

Lines 5-8 fetches the git repo for hello-nix. However, it is not a flake, so we have to build it; -this is done in line ???.

+this is done in line 15.

Here’s a demonstration using the shell.

@@ -4835,7 +4837,7 @@ this is done in line ???.

$ hello-nix # this will fail
-bash: line 52: hello-nix: command not found
+bash: line 53: hello-nix: command not found
 $ nix develop
 $ hello-nix
 Hello from your nix package!
@@ -4927,7 +4929,7 @@ Hello from your flake!
diff --git a/source/recipes/devshell/nix-non-flake/main.adoc0 b/source/recipes/devshell/nix-non-flake/main.adoc0 index e8e9331..35c144b 100644 --- a/source/recipes/devshell/nix-non-flake/main.adoc0 +++ b/source/recipes/devshell/nix-non-flake/main.adoc0 @@ -64,7 +64,8 @@ $# EOL [#devshell-impure] == If the nix derivation requires `nixpkgs` -We need to write the derivation ourselves, using `default.nix` as a model. +In this case, we need to write the derivation ourselves. +We can use `default.nix` as a model. Line 15 should be replaced with: [source,nix]