From 5689577cfbd7a62dcd4411d669c070963e39a653 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 2 Nov 2024 02:30:42 -0400 Subject: fix: update for nix 2.24 (#20) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(nix): cleanup flake * chore(nix): update flake.lock Flake lock file updates: • Updated input 'nix-filter': 'github:numtide/nix-filter/3342559a24e85fc164b295c3444e8a139924675b?narHash=sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj%2BrL8sRQsSM%3D' (2024-03-11) → 'github:numtide/nix-filter/776e68c1d014c3adde193a18db9d738458cd2ba4?narHash=sha256-SCHiL%2B1f7q9TAnxpasriP6fMarWE5H43t25F5/9e28I%3D' (2024-10-29) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1?narHash=sha256-Jks8O42La%2Bnm5AMTSq/PvM5O%2BfUAhIy0Ce1QYqLkyZ4%3D' (2024-09-12) → 'github:NixOS/nixpkgs/2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53?narHash=sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z%2Bw%3D' (2024-10-30) * fix: update for nix 2.24 nix path-info's output changed --- src/nix.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/nix.rs b/src/nix.rs index a2268a2..165fabf 100644 --- a/src/nix.rs +++ b/src/nix.rs @@ -8,13 +8,6 @@ use serde::{Deserialize, Serialize}; use serde_json::Value; use tracing::{event, instrument, Level}; -/// JSON output of `nix path-info` -#[derive(Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord, Deserialize, Serialize)] -#[serde(rename_all = "camelCase")] -struct PathInfo { - path: String, -} - /// JSON output of `nix build` #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] @@ -94,11 +87,8 @@ pub fn closure_paths(store_path: &str) -> Result> { .output()?; if output.status.success() { - let path_infos: Vec = serde_json::from_slice(&output.stdout)?; - let paths = path_infos - .into_iter() - .map(|path_info| path_info.path) - .collect(); + let path_infos: HashMap = serde_json::from_slice(&output.stdout)?; + let paths = path_infos.into_keys().collect(); Ok(paths) } else { let code = output.status.code().unwrap_or(1); -- cgit v1.2.3