Update a package: Difference between revisions

Pigs (talk | contribs)
m Fix category formatting
Update clone instructions to save disk space and avoid shallow clone
 
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 \
     --depth=1 # Prevents cloning the entire history, which is multiple gigabytes
     --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">