summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-09-04 13:51:36 +0200
committerlassulus <git@lassul.us>2023-09-04 13:51:36 +0200
commit73b17ef250e7f59daa8d19abba265015b8dc7c22 (patch)
treed46435c747224f692311d3c8cbbcafaa847ce01c /lass
parentb2ff8468458b90023439768858437582d026f9d5 (diff)
l: init nix-index-update
Diffstat (limited to 'lass')
-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
+''