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:
parent
5a36db3a99
commit
39c14be059
5 changed files with 4 additions and 1102 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue