aboutsummaryrefslogtreecommitdiff
path: root/tools/last-index.nix
diff options
context:
space:
mode:
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
+ '';
+}