From 73b17ef250e7f59daa8d19abba265015b8dc7c22 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 4 Sep 2023 13:51:36 +0200 Subject: l: init nix-index-update --- lass/5pkgs/nix-index-update/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lass/5pkgs/nix-index-update/default.nix (limited to 'lass') 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 +'' -- cgit v1.2.3