Skip to content

Commit

Permalink
PackageManager serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed May 27, 2024
1 parent 3b32e45 commit 885ce4c
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 157 deletions.
3 changes: 2 additions & 1 deletion crates/npm_scaffolding_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::path::PathBuf;

use dialoguer::{theme::ColorfulTheme, Select};
use file_tree_utils::{find_files_by_name, map_file, FileTree, FileTreeError, file_exists, file_content};
use serde::{Serialize, Deserialize};
use serde_json::{Map, Value};
use thiserror::Error;

Expand Down Expand Up @@ -269,7 +270,7 @@ pub fn get_name_of_root_package(file_tree: &FileTree) -> Result<String, NpmScaff
Ok(name.clone())
}

#[derive(Debug,Clone, Copy)]
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub enum PackageManager {
Npm,
Pnpm,
Expand Down
15 changes: 8 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,20 @@
{ crateCargoToml, holochain, workspacePath, excludedCrates ? [ ] }:
let
deterministicCraneLib = let
# system =;
system = holochain.devShells.holonix.system;
# system =;
system = holochain.devShells.holonix.system;
pkgs = import inputs.nixpkgs {
localSystem = system;
crossSystem = "x86_64-linux";
overlays = [ (import inputs.rust-overlay) ];
};

rustToolchain = (if system == "x86_64-linux" then pkgs else pkgs.pkgsBuildHost).rust-bin.stable."1.77.2".minimal.override {
# Set the build targets supported by the toolchain,
# wasm32-unknown-unknown is required for trunk.
targets = [ "wasm32-unknown-unknown" ];
};
rustToolchain =
pkgs.pkgsBuildHost.rust-bin.stable."1.77.2".minimal.override {
# Set the build targets supported by the toolchain,
# wasm32-unknown-unknown is required for trunk.
targets = [ "wasm32-unknown-unknown" ];
};
in (inputs.crane.mkLib pkgs).overrideToolchain rustToolchain;

system = holochain.devShells.holonix.system;
Expand Down
102 changes: 51 additions & 51 deletions nix/fixtures/module-repo/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 885ce4c

Please sign in to comment.