Flakes: Difference between revisions

imported>Siers
Hello world output
imported>Siers
Undo revision 7655 by Siers (talk)
Line 191: Line 191:


You can also define additional arbitrary attributes, but these are the outputs that Nix knows about.
You can also define additional arbitrary attributes, but these are the outputs that Nix knows about.
=== Hello world output ===
<syntaxHighlight>
$ cat flake.nix
{
  outputs = {self, nixpkgs}: {
    packages."x86_64-linux".default =
      nixpkgs.legacyPackages."x86_64-linux".writeText "hello" "world";
  };
}
$ nix build
$ cat result
world
</syntaxHighlight>


== Using flakes project from a legacy Nix ==
== Using flakes project from a legacy Nix ==