Python: Difference between revisions
imported>Asymmetric m Code highlighting |
imported>Asymmetric Add application example |
||
Line 17: | Line 17: | ||
Python applications instead should be referenced directly from <code>pkgs/top-level/all-packages.nix</code>. | Python applications instead should be referenced directly from <code>pkgs/top-level/all-packages.nix</code>. | ||
The expression should take <code>pythonPackages</code> as one of the arguments, which guarantees that packages belong to the same set. | The expression should take <code>pythonPackages</code> as one of the arguments, which guarantees that packages belong to the same set. For example: | ||
<syntaxhighlight lang="nix"> | |||
{ lib | |||
, pythonPackages | |||
}: | |||
with pythonPackages; | |||
buildPythonApplication rec { | |||
# ... | |||
</syntaxhighlight> | |||
= External Documentation = | = External Documentation = | ||
* [https://nixos.org/nixpkgs/manual/#python Python user guide in nixpkgs manual] | * [https://nixos.org/nixpkgs/manual/#python Python user guide in nixpkgs manual] |