about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-09T12·27+0000
committerVincent Ambo <tazjin@google.com>2019-12-09T12·27+0000
commitded10fbd83ed2c6c4ebdf2b024a1388d8b7fd63d (patch)
treea5c8009f023b77e8b2b5b188b27a466ddb5931be
parent9fb24840ab2951d178fe2b02a0da0c8d8ec4d532 (diff)
feat(tools): Add auto-dispatch for Advent of Code solutions r/115
-rw-r--r--tools/aoc2019/default.nix2
-rwxr-xr-xtools/bin/__dispatch.sh3
l---------tools/bin/aoc20191
3 files changed, 5 insertions, 1 deletions
diff --git a/tools/aoc2019/default.nix b/tools/aoc2019/default.nix
index 3c10ea88b1..a53586eea9 100644
--- a/tools/aoc2019/default.nix
+++ b/tools/aoc2019/default.nix
@@ -14,7 +14,7 @@ let
   solutions = map (f: let day = getDay f; in {
     name = day;
     value = pkgs.writeElispBin {
-      name = "solution-${day}";
+      name = "aoc2019";
       deps = p: with p; [ dash s ht ];
       src = ./. + ("/" + f);
     };
diff --git a/tools/bin/__dispatch.sh b/tools/bin/__dispatch.sh
index c22b0339fd..fb8a4d7791 100755
--- a/tools/bin/__dispatch.sh
+++ b/tools/bin/__dispatch.sh
@@ -25,6 +25,9 @@ case "${TARGET_TOOL}" in
   pass)
     attr="tools.kms_pass"
     ;;
+  aoc2019)
+    attr="tools.aoc2019.${1}"
+    ;;
   *)
     echo "The tool '${TARGET_TOOL}' is currently not installed in this repository."
     exit 1
diff --git a/tools/bin/aoc2019 b/tools/bin/aoc2019
new file mode 120000
index 0000000000..8390ec9c96
--- /dev/null
+++ b/tools/bin/aoc2019
@@ -0,0 +1 @@
+__dispatch.sh
\ No newline at end of file