summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/nix-index-update
diff options
context:
space:
mode:
Diffstat (limited to 'lass/5pkgs/nix-index-update')
-rw-r--r--lass/5pkgs/nix-index-update/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/lass/5pkgs/nix-index-update/default.nix b/lass/5pkgs/nix-index-update/default.nix
new file mode 100644
index 000000000..40be8d1a3
--- /dev/null
+++ b/lass/5pkgs/nix-index-update/default.nix
@@ -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
+''