From 5cdd76edd50c66f5f2210af98a3ea56728c4ed6b Mon Sep 17 00:00:00 2001 From: James Williams Date: Thu, 23 Feb 2023 22:06:53 +0000 Subject: [PATCH] fix: typos in 'Our First Derivation' --- pills/06-our-first-derivation.xml | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pills/06-our-first-derivation.xml b/pills/06-our-first-derivation.xml index 68bf4ba..3303721 100644 --- a/pills/06-our-first-derivation.xml +++ b/pills/06-our-first-derivation.xml @@ -42,7 +42,7 @@ - The derivation function receives a set as first argument. This + The derivation function receives a set as its first argument. This set requires at least the following three attributes: @@ -61,7 +61,7 @@ - builder: it is the binary program that builds the derivation. + builder: is the binary program that builds the derivation. @@ -101,19 +101,19 @@ - .nix files are like .c files + .nix files are like .c files. .drv files are intermediate files like .o files. The .drv describes - how to build a derivation, it's the bare minimum information. + how to build a derivation; it's the bare minimum information. - out paths are then the product of the build + out paths are then the product of the build. @@ -131,14 +131,14 @@ - Ok we can see there's an out path, but it does not exist yet. We never told + Ok, we can see there's an out path, but it does not exist yet. We never told Nix to build it, but we know beforehand where the build output will be. Why? Think, if Nix ever built the derivation just because we accessed it in Nix, we would have to wait a long time if it was, say, Firefox. That's why Nix - let us know the path beforehand and keep evaluating the Nix expressions, but + let us know the path beforehand and kept evaluating the Nix expressions, but it's still empty because no build was ever made. @@ -252,7 +252,7 @@ - You can guess what builtins.isAttrs does, it returns true if + You can guess what builtins.isAttrs does; it returns true if the argument is a set. While builtins.attrNames returns a list of keys of the given set. Some kind of reflection, you might say. @@ -264,9 +264,9 @@ - That's basically the input we gave to the derivation function. Also + That's basically the input we gave to the derivation function. Also the d.name, d.system and d.builder - attributes are straight the ones we gave as input. + attributes are exactly the ones we gave as input. @@ -286,7 +286,7 @@ Something interesting is the type attribute. It's "derivation". Nix does add a little of magic to sets with type - derivation, but not that much. To let you understand, you can create + derivation, but not that much. To help you understand, you can create yourself a set with that type, it's a simple set: @@ -304,7 +304,7 @@ - The outPath attribute is the build path in the nix store: + The outPath attribute is the build path in the nix store: /nix/store/40s0qmrfb45vlh6610rk29ym318dswdr-myname. @@ -317,9 +317,9 @@ Just like dependencies in other package managers, how do we refer to other packages? How do we refer to other derivations in terms of files on the - disk? We use the outPath. The outPath tells where the files are of that - derivation. To make it more convenient, Nix is able to do a conversion from - a derivation set to a string. + disk? We use the outPath. The outPath describes + the location of the files of that derivation. To make it more convenient, + Nix is able to do a conversion from a derivation set to a string. @@ -457,7 +457,7 @@ Conclusion - Is it that complicated to create a package for Nix? No it's not. + Is it that complicated to create a package for Nix? No, it's not. @@ -469,8 +469,8 @@ With the derivation function we provide a set of information on how to build a package, and we get back the information about where the package was - built. Nix converts a set to a string when there's an outPath, that's very - convenient. With that, it's easy to refer to other derivations. + built. Nix converts a set to a string when there's an outPath; + that's very convenient. With that, it's easy to refer to other derivations.