Skip to content

Commit 3361098

Browse files
authored
Update the Yarn overlay example and make sure it works (#1305)
## Summary - Fixes the yarn overlay example so that the nodejs16 version matches the one installed by devbox - Updates the lockfile ## How was it tested? `devbox shell` `yarn versions`
1 parent 58e6f44 commit 3361098

File tree

4 files changed

+31
-16
lines changed

4 files changed

+31
-16
lines changed
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"packages": [
3-
"fnm",
4-
"path:yarn-overlay#yarn"
3+
"path:yarn-overlay#yarn",
4+
"fnm@latest",
5+
56
],
67
"shell": {
78
"init_hook": [
@@ -11,4 +12,4 @@
1112
"nixpkgs": {
1213
"commit": "eabc38219184cc3e04a974fe31857d8e0eac098d"
1314
}
14-
}
15+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"lockfile_version": "1",
3+
"packages": {
4+
"fnm@latest": {
5+
"last_modified": "2023-05-06T16:57:53Z",
6+
"resolved": "github:NixOS/nixpkgs/16b3b0c53b1ee8936739f8c588544e7fcec3fc60#fnm",
7+
"source": "devbox-search",
8+
"version": "1.33.1"
9+
},
10+
11+
"last_modified": "2021-09-06T20:58:52Z",
12+
"resolved": "github:NixOS/nixpkgs/fc3de6da83863f8f36fdcac1c199c6066a6a0378#nodejs-16_x",
13+
"source": "devbox-search",
14+
"version": "16.8.0"
15+
}
16+
}
17+
}

examples/flakes/overlay/yarn-overlay/flake.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/flakes/overlay/yarn-overlay/flake.nix

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"This flake outputs a modified version of Yarn that uses NodeJS 16";
44

55
inputs = {
6-
nixpkgs.url = "nixpkgs/nixos-21.11";
6+
nixpkgs.url = "nixpkgs/fc3de6da83863f8f36fdcac1c199c6066a6a0378";
77
flake-utils.url = "github:numtide/flake-utils";
88
};
99

@@ -17,22 +17,19 @@
1717
yarn = prev.yarn.override { nodejs = final.pkgs.nodejs-16_x; };
1818
});
1919

20-
#
20+
#
2121
pkgs =
2222
import nixpkgs {
2323
inherit system;
2424
# Add your overlays to the list below. Note that they will be applied in order
2525
overlays = [ overlay ];
2626
};
2727

28-
in {
28+
in rec {
2929
# For our outputs, we'll return the modified Yarn package from our overridden nixpkgs.
3030
packages = {
3131
yarn = pkgs.yarn;
3232
};
33-
34-
# [Optional] Set yarn as the default package output for this flake
35-
defaultPackage = self.packages.yarn;
3633
}
3734
);
3835
}

0 commit comments

Comments
 (0)