Update a package: Difference between revisions
imported>Tomodachi94 Add --depth flag to clone instruction |
Update clone instructions to save disk space and avoid shallow clone |
||
| (5 intermediate revisions by 5 users not shown) | |||
| Line 22: | Line 22: | ||
cd ~/devel/ | cd ~/devel/ | ||
git clone https://github.com/your_username/nixpkgs.git \ | git clone https://github.com/your_username/nixpkgs.git \ | ||
-- | --filter=blob:none # Prevents downloading the entire history, which saves a couple Gb | ||
cd nixpkgs/ | cd nixpkgs/ | ||
git remote add upstream https://github.com/NixOS/nixpkgs.git</syntaxhighlight> | git remote add upstream https://github.com/NixOS/nixpkgs.git | ||
git gc --aggressive # nixpkgs is a large repository; this brings down the disk usage by another Gb or so</syntaxhighlight> | |||
* When the clone is not recent or you suspect there have been changes upstream (in official nixpkgs): | * When the clone is not recent or you suspect there have been changes upstream (in official nixpkgs): | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
| Line 41: | Line 42: | ||
== Following the white rabbit == | == Following the white rabbit == | ||
* This section does not apply for packages in the directory pkgs/by-name. For them, see the included [https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/README.md pkgs/by-name/README.md]. | |||
* I will center this tutorial on the nix expression that packages the [http://i3wm.org/ i3 window manager], as this expression is quite simple and it was contributing to this expression that I got to understand this whole workflow I am documenting. | * I will center this tutorial on the nix expression that packages the [http://i3wm.org/ i3 window manager], as this expression is quite simple and it was contributing to this expression that I got to understand this whole workflow I am documenting. | ||
* In <tt>~/devel/nixpkgs/default.nix</tt> there is an ''import'' statement that reads <tt>import ./pkgs/top-level/all-packages.nix</tt> | * In <tt>~/devel/nixpkgs/default.nix</tt> there is an ''import'' statement that reads <tt>import ./pkgs/top-level/all-packages.nix</tt> | ||
| Line 490: | Line 492: | ||
* [[Create and debug nix packages]] | * [[Create and debug nix packages]] | ||
* [[Generic Algorithm on Doing Packaging]] | * [[Generic Algorithm on Doing Packaging]] | ||
* [[Contributing to Nix documentation]] | * [[Contributing#Contributing to the documentation|Contributing to Nix documentation]] | ||
* [[Nixpkgs/Update Scripts]] - automatic updating of packages | |||
[[ | [[Category:Tutorial]] | ||
[[:Category: | [[Category:Nixpkgs]] | ||
[[Category:Contributing]] | |||