1
Fork 0
mirror of https://github.com/RGBCube/AdventOfCode synced 2025-07-27 20:17:43 +00:00

Share inputs between days

This commit is contained in:
RGBCube 2023-12-02 17:43:32 +03:00
parent 5a36db3a99
commit 39c14be059
No known key found for this signature in database
5 changed files with 4 additions and 1102 deletions

View file

@ -13,9 +13,11 @@
pathToResult = path: (import ./${path}.nix {
inherit lib;
input = builtins.concatStringsSep "\n"
input = let
inputPath = lib.head (lib.splitString "-" path);
in builtins.concatStringsSep "\n"
(builtins.filter (line: line != "")
(lib.splitString "\n" (builtins.readFile ./${path}.in)));
(lib.splitString "\n" (builtins.readFile ./${inputPath}.in)));
}).result;
in lib.genAttrs [
"2023/1-1"