Flakes: Difference between revisions

Ardenet (talk | contribs)
No edit summary
Ardenet (talk | contribs)
mNo edit summary
Line 32: Line 32:
packages.x86_64-linux.default = self.packages.x86_64-linux.hello;
packages.x86_64-linux.default = self.packages.x86_64-linux.hello;


};
  };
}</nowiki>|name=flake.nix|lang=nix}}
}</nowiki>|name=flake.nix|lang=nix}}


Line 38: Line 38:
<!--T:190-->
<!--T:190-->
In the example above, you can see the description, the input specified as a GitHub repository with a specific branch (here <code>nixos/nixpkgs</code> on the <code>nixos-unstable</code> branch), and an output that makes use of the input. The output simply specifies that the flake contains one package for the x86_64 architecture called <code>hello</code>. Even if your flake's output wouldn't use its input (however, in practice, that is highly unlikely), the output still needs to be a Nix function.
In the example above, you can see the description, the input specified as a GitHub repository with a specific branch (here <code>nixos/nixpkgs</code> on the <code>nixos-unstable</code> branch), and an output that makes use of the input. The output simply specifies that the flake contains one package for the x86_64 architecture called <code>hello</code>. Even if your flake's output wouldn't use its input (however, in practice, that is highly unlikely), the output still needs to be a Nix function.
{{Note|Flakes require you to specify its outputs for each architecture separately. For more information, read the related section below.
</translate>}}


<translate>
{{Note|Flakes require you to specify its outputs for each architecture separately. For more information, read the related section below.}}
 
<!--T:191-->
<!--T:191-->
=== Nix configuration ===
=== Nix configuration ===