From c5861c0b22a8db21af812af2e66aaa9bd1d4af23 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 1 Dec 2022 10:01:42 +0100 Subject: [PATCH] nix: bump flake inputs --- 2019/d18/ex1/ex1.py | 4 +-- 2019/d18/ex2/ex2.py | 4 +-- flake.lock | 60 ++++++++++++++++++++++++++++++++++++++------- flake.nix | 1 + 4 files changed, 56 insertions(+), 13 deletions(-) diff --git a/2019/d18/ex1/ex1.py b/2019/d18/ex1/ex1.py index 1968be5..8599ea4 100755 --- a/2019/d18/ex1/ex1.py +++ b/2019/d18/ex1/ex1.py @@ -65,7 +65,7 @@ def build_graph(grid: RawGrid) -> Graph: def solve(G: Graph, start: str) -> int: - @lru_cache(2 ** 20) + @lru_cache(2**20) def reachable_keys(src: str, found: FrozenSet[str]) -> List[Tuple[str, int]]: queue = [] distance: DefaultDict[str, Union[float, int]] = defaultdict(lambda: inf) @@ -97,7 +97,7 @@ def solve(G: Graph, start: str) -> int: return reachable - @lru_cache(2 ** 20) + @lru_cache(2**20) def min_steps( src: str, keys_to_find: int, found: FrozenSet[str] = frozenset() ) -> int: diff --git a/2019/d18/ex2/ex2.py b/2019/d18/ex2/ex2.py index 4463618..9b890a5 100755 --- a/2019/d18/ex2/ex2.py +++ b/2019/d18/ex2/ex2.py @@ -65,7 +65,7 @@ def build_graph(grid: RawGrid) -> Graph: def solve(G: Graph, start: str) -> int: - @lru_cache(2 ** 20) + @lru_cache(2**20) def reachable_keys(src: str, found: FrozenSet[str]) -> GraphInfo: queue = [] distance: DefaultDict[str, Union[float, int]] = defaultdict(lambda: inf) @@ -97,7 +97,7 @@ def solve(G: Graph, start: str) -> int: return reachable - @lru_cache(2 ** 20) + @lru_cache(2**20) def min_steps( sources: str, keys_to_find: int, found: FrozenSet[str] = frozenset() ) -> Union[float, int]: diff --git a/flake.lock b/flake.lock index b743e83..7bc7877 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,28 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1668681692, + "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "futils": { "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { @@ -16,13 +32,34 @@ "type": "github" } }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1638286143, - "narHash": "sha256-A+rgjbIpz3uPRKHPXwdmouVcVn5pZqLnaZHymjkraG4=", + "lastModified": 1669542132, + "narHash": "sha256-DRlg++NJAwPh8io3ExBJdNW7Djs3plVI5jgYQ+iXAZQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "29d1f6e1f625d246dcf84a78ef97b4da3cafc6ea", + "rev": "a115bb9bd56831941be3776c8a94005867f316a7", "type": "github" }, "original": { @@ -34,19 +71,24 @@ }, "pre-commit-hooks": { "inputs": { + "flake-compat": "flake-compat", "flake-utils": [ "futils" ], + "gitignore": "gitignore", "nixpkgs": [ "nixpkgs" + ], + "nixpkgs-stable": [ + "nixpkgs" ] }, "locked": { - "lastModified": 1637745948, - "narHash": "sha256-DmQG1bZk24eS+BAHwnHPyYIadMLKbq0d1b//iapYIPU=", + "lastModified": 1669829516, + "narHash": "sha256-laWMD/TZzyrulu8xLNoSPertXOxjRD7BrcAVwKl+NyQ=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "c3b4f94350b0e59c2546fa85890cc70d03616b9c", + "rev": "471c7f1ecace25e39099206431300322632d25c4", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7796816..d09ee81 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ inputs = { flake-utils.follows = "futils"; nixpkgs.follows = "nixpkgs"; + nixpkgs-stable.follows = "nixpkgs"; }; }; };