diff --git a/flake.nix b/flake.nix index febc6754..990395ce 100644 --- a/flake.nix +++ b/flake.nix @@ -38,7 +38,11 @@ }; }; - packages.default = self'.packages.nix-browser; + packages.default = self'.packages.nix-browser.overrideAttrs (oa: { + buildInputs = oa.buildInputs ++ [ + pkgs.nix # cargo tests need nix + ]; + }); devShells.default = pkgs.mkShell { inputsFrom = [ diff --git a/src/nix/config.rs b/src/nix/config.rs index bcf091d6..34910daa 100644 --- a/src/nix/config.rs +++ b/src/nix/config.rs @@ -1,8 +1,5 @@ -use std::collections::HashMap; - use leptos::*; use serde::{Deserialize, Serialize}; -use serde_json::Value; /// Nix configuration spit out by `nix show-config` #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -14,11 +11,8 @@ pub struct NixConfig { pub extra_platforms: ConfigVal>, pub flake_registry: ConfigVal, pub max_jobs: ConfigVal, - pub max_substitution_jobs: ConfigVal, pub substituters: ConfigVal>, pub system: ConfigVal, - #[serde(flatten)] - pub other: HashMap>, } /// The value for each 'nix show-config --json' key. @@ -75,7 +69,7 @@ pub async fn run_nix_show_config() -> Result { Ok(v) } else { Err(ServerFnError::ServerError( - "Unable to determine nix version".into(), + "'nix show-config' failed".into(), )) } }