aboutsummaryrefslogtreecommitdiff
path: root/tools/last-index.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2020-02-09 17:57:54 +1100
committerJustin Bedo <cu@cua0.org>2020-02-09 17:57:54 +1100
commitb8caa245cb6bb4616318173b81e9207aee414859 (patch)
treebb003911613d8a64b736a1d73c472b0e1aa27043 /tools/last-index.nix
parent4084db9f31aa2b2b6701e0f7261f4dfcd86eaa74 (diff)
lastal: init
Diffstat (limited to 'tools/last-index.nix')
-rw-r--r--tools/last-index.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/last-index.nix b/tools/last-index.nix
new file mode 100644
index 0000000..af74f65
--- /dev/null
+++ b/tools/last-index.nix
@@ -0,0 +1,21 @@
+{ bionix
+, flags ? null
+}:
+
+ref:
+
+with bionix;
+with lib;
+with types;
+
+assert (matchFiletype "last-index" { fa = _: true; } ref);
+
+stage {
+ name = "last-index";
+ buildInputs = with pkgs; [ last ];
+ buildCommand = ''
+ ln -s ${ref} ref.fa
+ mkdir $out
+ lastdb ${optionalString (flags != null) flags} $out/index ref.fa
+ '';
+}