Skip to content

Commit

Permalink
Merge branch 'nixify' into 0.400.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed May 8, 2024
2 parents 7334f71 + a4731cf commit b00f58f
Show file tree
Hide file tree
Showing 8 changed files with 292 additions and 320 deletions.
40 changes: 20 additions & 20 deletions flake.lock

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

86 changes: 35 additions & 51 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
description = "Template for Holochain app development";

inputs = {
nixpkgs.follows = "holochain/nixpkgs";

versions.url = "github:holochain/holochain?dir=versions/weekly";
versions.url = "github:holochain/holochain?dir=versions/0_3_rc";

holochain = {
url = "github:holochain/holochain";
Expand All @@ -14,57 +14,41 @@
};

nixConfig = {
extra-substituters = [
"https://holochain-open-dev.cachix.org"
];
extra-trusted-public-keys = [
"holochain-open-dev.cachix.org-1:3Tr+9in6uo44Ga7qiuRIfOTFXog+2+YbyhwI/Z6Cp4U="
];
};
extra-substituters = [ "https://holochain-open-dev.cachix.org" ];
extra-trusted-public-keys = [
"holochain-open-dev.cachix.org-1:3Tr+9in6uo44Ga7qiuRIfOTFXog+2+YbyhwI/Z6Cp4U="
];
};

outputs = inputs @ { ... }:
inputs.holochain.inputs.flake-parts.lib.mkFlake
{
inherit inputs;
specialArgs.rootPath = ./.;
}
{
imports = [
./crates/coordinator/zome.nix
./crates/integrity/zome.nix
];
outputs = inputs@{ ... }:
inputs.holochain.inputs.flake-parts.lib.mkFlake {
inherit inputs;
specialArgs.rootPath = ./.;
} {
imports = [ ./crates/coordinator/zome.nix ./crates/integrity/zome.nix ];

systems = builtins.attrNames inputs.holochain.devShells;
perSystem =
{ inputs'
, config
, pkgs
, system
, lib
, ...
}: {
devShells.default = pkgs.mkShell {
inputsFrom = [ inputs'.holochain.devShells.holonix ];
packages = with pkgs; [
nodejs_20
];
};
systems = builtins.attrNames inputs.holochain.devShells;
perSystem = { inputs', config, pkgs, system, lib, ... }: {
devShells.default = pkgs.mkShell {
inputsFrom = [ inputs'.holochain.devShells.holonix ];
packages = with pkgs; [ nodejs_20 ];
};

packages.scaffold = pkgs.symlinkJoin {
name = "scaffold-remote-zome";
paths = [ inputs'.hc-infra.packages.scaffold-remote-zome ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/scaffold-remote-zome \
--add-flags "profiles \
--integrity-zome-name profiles_integrity \
--coordinator-zome-name profiles \
--remote-zome-git-url github:holochain-open-dev/profiles \
--remote-zome-git-branch nixify \
--remote-npm-package-name @holochain-open-dev/profiles \
--remote-npm-package-path ui"
'';
};
};
packages.scaffold = pkgs.symlinkJoin {
name = "scaffold-remote-zome";
paths = [ inputs'.hc-infra.packages.scaffold-remote-zome ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/scaffold-remote-zome \
--add-flags "profiles \
--integrity-zome-name profiles_integrity \
--coordinator-zome-name profiles \
--remote-zome-git-url github:holochain-open-dev/profiles \
--remote-zome-git-branch nixify \
--remote-npm-package-name @holochain-open-dev/profiles \
--remote-npm-package-path ui"
'';
};
};
};
}
16 changes: 8 additions & 8 deletions package-lock.json

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

57 changes: 28 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
{
"name": "@holochain-open-dev/profiles-dev",
"private": true,
"workspaces": ["ui", "tests", "docs"],
"scripts": {
"start": "AGENTS=2 npm run network",
"network": "hc s clean && npm run build:happ && BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run local-services\" \"npm run launch\" \"holochain-playground\"",
"test": "npm run build:happ && nix flake check -L && npm test -w tests",
"launch": "echo pass | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/profiles-test.happ --ui-port $UI_PORT network --bootstrap http://127.0.0.1:$BOOTSTRAP_PORT webrtc ws://127.0.0.1:$SIGNAL_PORT",
"local-services": "hc run-local-services --bootstrap-port $BOOTSTRAP_PORT --signal-port $SIGNAL_PORT",
"build:happ": "npm run build:zome && hc app pack workdir --recursive",
"build:zome": "CARGO_TARGET_DIR=target cargo build --release --target wasm32-unknown-unknown",
"docs:start": "npm run docs:setup && storybook dev -p 6006",
"docs:publish": "npm run docs:setup && storybook build && gh-pages -d ./storybook-static -b gh-pages",
"docs:setup": "npm run build -w @holochain-open-dev/profiles && npm run analyze -w @holochain-open-dev/profiles"
},
"devDependencies": {
"@holochain-playground/cli": "^0.1.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@eslint/js": "^8.0.0",
"concurrently": "^6.2.1",
"eslint": "^8.0.0",
"eslint-config-prettier": "^9.1.0",
"gh-pages": "^3.2.3",
"new-port-cli": "^1.0.0",
"prettier": "^3.2.5",
"typescript-eslint": "^7.7.0",
"typescript": "^5.4.5"
},
"type": "module"
"name": "@holochain-open-dev/profiles-dev",
"private": true,
"workspaces": ["ui", "tests", "docs"],
"scripts": {
"start": "AGENTS=2 npm run network",
"network": "hc s clean && npm run build:happ && BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run local-services\" \"npm run launch\" \"holochain-playground\"",
"test": "npm run build:happ && nix flake check -L && npm test -w tests",
"launch": "echo pass | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/profiles-test.happ --ui-port $UI_PORT network --bootstrap http://127.0.0.1:$BOOTSTRAP_PORT webrtc ws://127.0.0.1:$SIGNAL_PORT",
"local-services": "hc run-local-services --bootstrap-port $BOOTSTRAP_PORT --signal-port $SIGNAL_PORT",
"build:happ": "npm run build:zome && hc app pack workdir --recursive",
"build:zome": "CARGO_TARGET_DIR=target cargo build --release --target wasm32-unknown-unknown",
"docs:start": "npm run docs:setup && storybook dev -p 6006",
"docs:publish": "npm run docs:setup && storybook build && gh-pages -d ./storybook-static -b gh-pages",
"docs:setup": "npm run build -w @holochain-open-dev/profiles && npm run analyze -w @holochain-open-dev/profiles"
},
"devDependencies": {
"@holochain-playground/cli": "^0.1.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@eslint/js": "^8.0.0",
"concurrently": "^6.2.1",
"eslint": "^8.0.0",
"eslint-config-prettier": "^9.1.0",
"new-port-cli": "^1.0.0",
"prettier": "^3.2.5",
"typescript-eslint": "^7.7.0",
"typescript": "^5.4.5"
},
"type": "module"
}
Loading

0 comments on commit b00f58f

Please sign in to comment.