l: init nix-index-update
This commit is contained in:
parent
b2ff846845
commit
73b17ef250
9
lass/5pkgs/nix-index-update/default.nix
Normal file
9
lass/5pkgs/nix-index-update/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs }:
|
||||
pkgs.writers.writeDashBin "nix-index-update" ''
|
||||
set -efux
|
||||
filename="index-$(uname -m)-$(uname | tr A-Z a-z)"
|
||||
mkdir -p ~/.cache/nix-index && cd ~/.cache/nix-index
|
||||
# -N will only download a new version if there is an update.
|
||||
${pkgs.wget}/bin/wget -q -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename
|
||||
ln -f $filename files
|
||||
''
|
Loading…
Reference in a new issue