Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Aug 7, 2023
1 parent 8c0d3fa commit 6e8ba13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
8 changes: 1 addition & 7 deletions src/nix/config.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand All @@ -14,11 +11,8 @@ pub struct NixConfig {
pub extra_platforms: ConfigVal<Vec<String>>,
pub flake_registry: ConfigVal<String>,
pub max_jobs: ConfigVal<i32>,
pub max_substitution_jobs: ConfigVal<i32>,
pub substituters: ConfigVal<Vec<String>>,
pub system: ConfigVal<String>,
#[serde(flatten)]
pub other: HashMap<String, ConfigVal<Value>>,
}

/// The value for each 'nix show-config --json' key.
Expand Down Expand Up @@ -75,7 +69,7 @@ pub async fn run_nix_show_config() -> Result<NixConfig, ServerFnError> {
Ok(v)
} else {
Err(ServerFnError::ServerError(
"Unable to determine nix version".into(),
"'nix show-config' failed".into(),
))
}
}
Expand Down

0 comments on commit 6e8ba13

Please sign in to comment.