summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/nix-index-update/default.nix
blob: 40be8d1a37203b6fe9234d8f5c0298628a07a2d7 (plain)
1
2
3
4
5
6
7
8
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
''