Skip to content

Commit ae9526a

Browse files
authored
Merge pull request #280 from flox/dcarley/nef-overrideattrs
docs(nef): Tweak overrideAttrs naming
2 parents 7150c1f + 3b723a7 commit ae9526a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/concepts/nix-expression-builds.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ If the latest version of a package isn't yet available in the Flox Catalog then
137137
```nix title=".flox/pkgs/hello.nix"
138138
{ hello, fetchurl }:
139139
140-
hello.overrideAttrs (finalAttrs: old: {
140+
hello.overrideAttrs (finalAttrs: _oldAttrs: {
141141
version = "2.12.2";
142142
src = fetchurl {
143143
url = "mirror://gnu/hello/hello-${finalAttrs.version}.tar.gz";
@@ -153,11 +153,11 @@ If you want to apply a patch, such as an unreleased bug fix, to an existing pack
153153
```nix title=".flox/pkgs/hello-shouty/default.nix"
154154
{ hello }:
155155
156-
hello.overrideAttrs (old: {
157-
patches = (old.patches or []) ++ [
156+
hello.overrideAttrs (oldAttrs: {
157+
patches = (oldAttrs.patches or []) ++ [
158158
./shouty.patch
159159
];
160-
meta = old.meta // {
160+
meta = oldAttrs.meta // {
161161
description = "A patched version of hello that shouts the default greeting.";
162162
};
163163
})

0 commit comments

Comments
 (0)