Skip to content

Commit 860345a

Browse files
committed
docs: Update on the system argument
1 parent 36bce23 commit 860345a

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

doc/src/content/docs/patterns/nix-systems.mdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ To use nix-systems, follow these steps:
3939
```diff lang="nix" title="flake.nix"
4040
eachSystem =
4141
f:
42-
- nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f nixpkgs.legacyPackages.${system});
43-
+ nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
42+
- nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f system nixpkgs.legacyPackages.${system});
43+
+ nixpkgs.lib.genAttrs (import systems) (system: f system nixpkgs.legacyPackages.${system});
4444
```
4545

4646
{% /steps %}

doc/src/content/docs/recipes/go/executable.mdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ To expose the program as a Nix flake package, comment out the stub inside
5353
1. Adapt `pname` and `version` to match your package information:
5454

5555
```diff lang="nix" title="flake.nix"
56-
packages = eachSystem (pkgs: {
56+
packages = eachSystem (_system: pkgs: {
5757
default = pkgs.buildGoModule {
5858
- pname = "hello";
5959
+ pname = "your-go-program";
@@ -77,7 +77,7 @@ To expose the program as a Nix flake package, comment out the stub inside
7777
the output.
7878

7979
```diff lang="nix" title="flake.nix"
80-
packages = eachSystem (pkgs: {
80+
packages = eachSystem (_system: pkgs: {
8181
default = pkgs.buildGoModule {
8282
...intensionaly omitted
8383
src = self.outPath;

doc/src/content/docs/recipes/ocaml/generic-dune.mdoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,11 @@ To run sherlodoc, follow this instruction.
232232

233233
```diff lang="nix" title="flake.nix"
234234
devShells = eachSystem (
235-
{ pkgs, ocamlPackages, ... }:
236-
{
235+
system: pkgs: {
237236
default = pkgs.mkShell {
238-
inputsFrom = [ self.packages.${pkgs.stdenv.hostPlatform.system}.default ];
237+
inputsFrom = [ self.packages.${system}.default ];
239238
buildInputs = (
240-
with ocamlPackages;
239+
with pkgs.ocamlPackages;
241240
[
242241
ocaml-lsp
243242
ocamlformat

doc/src/content/docs/recipes/typescript/web-framework.mdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ project. Below are some links:
9292

9393
```nix
9494
{
95-
devShells = eachSystem (pkgs: {
95+
devShells = eachSystem (_system: pkgs: {
9696
default = pkgs.mkShell {
9797
buildInputs = [
9898
...
@@ -112,7 +112,7 @@ Open `flake.nix` and comment out the corresponding package name in the `package`
112112
field of the default shell, depending on the package manager of your choice.
113113

114114
```diff lang="nix" title="flake.nix"
115-
devShells = eachSystem (pkgs: {
115+
devShells = eachSystem (_system: pkgs: {
116116
default = pkgs.mkShell {
117117
buildInputs = [
118118
pkgs.nodejs

0 commit comments

Comments
 (0)