diff options
author | Vincent Ambo <tazjin@google.com> | 2019-12-09T12·27+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2019-12-09T12·27+0000 |
commit | ded10fbd83ed2c6c4ebdf2b024a1388d8b7fd63d (patch) | |
tree | a5c8009f023b77e8b2b5b188b27a466ddb5931be /tools | |
parent | 9fb24840ab2951d178fe2b02a0da0c8d8ec4d532 (diff) |
feat(tools): Add auto-dispatch for Advent of Code solutions r/115
Diffstat (limited to 'tools')
-rw-r--r-- | tools/aoc2019/default.nix | 2 | ||||
-rwxr-xr-x | tools/bin/__dispatch.sh | 3 | ||||
l--------- | tools/bin/aoc2019 | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/tools/aoc2019/default.nix b/tools/aoc2019/default.nix index 3c10ea88b1c8..a53586eea9eb 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 c22b0339fd9e..fb8a4d779185 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 000000000000..8390ec9c9652 --- /dev/null +++ b/tools/bin/aoc2019 @@ -0,0 +1 @@ +__dispatch.sh \ No newline at end of file |