Python: Difference between revisions

imported>Makefu
initial batch of nixos-users
 
imported>Fadenb
m Syntax highlighting
Line 1: Line 1:
== Contribution guidelines ==
== Contribution guidelines ==


According to the [https://nixos.org/nixpkgs/manual/#contributing-guidelines official guidelines] for python new package expressions should be placed in <code>pkgs/development/python-modules/&lt;name&gt;/default.nix</code>. Those expressions are then referenced from <code>pkgs/top-level/python-packages.nix</code> like in this example:
According to the [https://nixos.org/nixpkgs/manual/#contributing-guidelines official guidelines] for python new package expressions should be placed in <syntaxhighlight lang="bash" inline>pkgs/development/python-modules/<name>/default.nix</syntaxhighlight>. Those expressions are then referenced from <code>pkgs/top-level/python-packages.nix</code> like in this example:


<pre class="nix">{
<syntaxhighlight lang="nix">
{
   aenum = callPackage ../development/python-modules/aenum { };
   aenum = callPackage ../development/python-modules/aenum { };
}</pre>
}
</syntaxhighlight>
The reasoning behind this is the large size of <code>pkgs/top-level/python-packages.nix</code>. Unfortunately most libraries are still defined in-place in <code>pkgs/top-level/python-packages.nix</code>. If a change to library is necessary or an update is made, it is recommend to move the modified package out of <code>pkgs/top-level/python-packages.nix</code>.
The reasoning behind this is the large size of <code>pkgs/top-level/python-packages.nix</code>. Unfortunately most libraries are still defined in-place in <code>pkgs/top-level/python-packages.nix</code>. If a change to library is necessary or an update is made, it is recommend to move the modified package out of <code>pkgs/top-level/python-packages.nix</code>.