Jump to content

Translations:Flakes/190/ru: Difference between revisions

From NixOS Wiki
Golits (talk | contribs)
Created page with "}; }</nowiki>|name=flake.nix|lang=nix}} В примере выше вы можете видеть описание, вход (input), указанный как репозиторий GitHub с конкретной веткой (здесь <code>nixos/nixpkgs</code> на ветке <code>nixos-unstable</code>), и выход (output), который использует этот input. Output в этом примере просто определяет, что в флей..."
 
(No difference)

Latest revision as of 12:57, 10 August 2025

Message definition (Flakes)
};
}</nowiki>|name=flake.nix|lang=nix}}
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.}}

}; }</nowiki>|name=flake.nix|lang=nix}} В примере выше вы можете видеть описание, вход (input), указанный как репозиторий GitHub с конкретной веткой (здесь nixos/nixpkgs на ветке nixos-unstable), и выход (output), который использует этот input. Output в этом примере просто определяет, что в флейке есть один пакет для архитектуры x86_64 под именем hello. Даже если output вашего флейка не использует его inputs (что на практике маловероятно), output всё равно должен быть Nix-функцией.

Note: Флейки требуют явного указания outputs для каждой архитектуры отдельно. Для дополнительной информации смотрите соответствующий раздел ниже.