Nixpkgs/Create and debug packages: Difference between revisions

imported>Mic92
nuke nox (no one uses this anymore)
imported>Benediktbroich
Add nixpkgs-fmt as formatter
Line 419: Line 419:
</syntaxhighlight>
</syntaxhighlight>


== Formatting Packages with alejandra ==
== Formatting Packages with nixpkgs-fmt ==
It is "good practice" to format packages in a way that following changed will create as minimal diffs as possible. The formatter [https://github.com/kamadorueda/alejandra alejandra] can be used for that. The configuration can be found [https://github.com/kamadorueda/alejandra#features here]. You can read the explanation of the formatting choices [https://github.com/kamadorueda/alejandra/blob/main/STYLE.md here].
It is "good practice" to format packages in a way that following changed will create as minimal diffs as possible. The formatter [https://github.com/nix-community/nixpkgs-fmt nixpkgs-fmt] can be used for that.
<syntaxhighlight lang="bash">
nixpkgs-fmt path/to/default.nix
</syntaxhighlight>


== Testing Packages with nixpkgs-hammering ==
== Testing Packages with nixpkgs-hammering ==