Skip to content
This repository was archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from holochain/2019-06-17-dist
Browse files Browse the repository at this point in the history
2019 06 17 dist
  • Loading branch information
thedavidmeister authored Jun 18, 2019
2 parents 8529efc + 5512a3c commit 312777b
Show file tree
Hide file tree
Showing 101 changed files with 719 additions and 642 deletions.
6 changes: 0 additions & 6 deletions app-spec-cluster/build.nix

This file was deleted.

6 changes: 6 additions & 0 deletions app-spec-cluster/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ pkgs }:
{
buildInputs = []
++ (pkgs.callPackage ./test { }).buildInputs
;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ pkgs }:
let
pkgs = import ../../nixpkgs/nixpkgs.nix;

name = "hc-app-spec-cluster-test";

script = pkgs.writeShellScriptBin name
Expand All @@ -12,4 +11,6 @@ let
( EMULATION_HOLOCHAIN_BIN_PATH=./.cargo/bin/holochain node ./app_spec/cluster_test/index.js 2)
'';
in
script
{
buildInputs = [ script ];
}
8 changes: 0 additions & 8 deletions app-spec/build.nix

This file was deleted.

7 changes: 7 additions & 0 deletions app-spec/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ pkgs }:
{
buildInputs = []
++ (pkgs.callPackage ./test { }).buildInputs
++ (pkgs.callPackage ./test_proc_macro { }).buildInputs
;
}
7 changes: 4 additions & 3 deletions app-spec/src/test.nix → app-spec/test/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ pkgs }:
let
pkgs = import ../../nixpkgs/nixpkgs.nix;

name = "hc-app-spec-test";

script = pkgs.writeShellScriptBin name ''
Expand All @@ -9,4 +8,6 @@ let
(cd app_spec && ./build_and_test.sh);
'';
in
script
{
buildInputs = [ script ];
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ pkgs }:
let
pkgs = import ../../nixpkgs/nixpkgs.nix;

name = "hc-app-spec-test-proc";

script = pkgs.writeShellScriptBin name
Expand All @@ -9,4 +8,6 @@ let
( cd app_spec_proc_macro && ./build_and_test.sh )
'';
in
script
{
buildInputs = [ script ];
}
10 changes: 0 additions & 10 deletions cli/build.nix

This file was deleted.

8 changes: 8 additions & 0 deletions cli/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{ pkgs }:
{
buildInputs = []
++ (pkgs.callPackage ./install { }).buildInputs
++ (pkgs.callPackage ./test { }).buildInputs
++ (pkgs.callPackage ./uninstall { }).buildInputs
;
}
7 changes: 4 additions & 3 deletions cli/src/install.nix → cli/install/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ pkgs }:
let
pkgs = import ../../nixpkgs/nixpkgs.nix;

name = "hc-cli-install";

script = pkgs.writeShellScriptBin name
''
cargo build -p hc --release && cargo install -f --path cli
'';
in
script
{
buildInputs = [ script ];
}
6 changes: 4 additions & 2 deletions cli/src/test.nix → cli/test/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ pkgs }:
let
pkgs = import ../../nixpkgs/nixpkgs.nix;

name = "hc-cli-test";

Expand All @@ -8,4 +8,6 @@ let
(cd cli && cargo test);
'';
in
script
{
buildInputs = [ script ];
}
7 changes: 4 additions & 3 deletions cli/src/uninstall.nix → cli/uninstall/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ pkgs }:
let
pkgs = import ../../nixpkgs/nixpkgs.nix;

name = "hc-cli-uninstall";

script = pkgs.writeShellScriptBin name
Expand All @@ -9,4 +8,6 @@ let
rm -f $CARGO_HOME/bin/hc
'';
in
script
{
buildInputs = [ script ];
}
4 changes: 0 additions & 4 deletions conductor/build.nix

This file was deleted.

8 changes: 8 additions & 0 deletions conductor/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{ pkgs }:
{
buildInputs = []
++ (pkgs.callPackage ./node { }).buildInputs
++ (pkgs.callPackage ./rust { }).buildInputs
++ (pkgs.callPackage ./wasm { }).buildInputs
;
}
8 changes: 0 additions & 8 deletions conductor/node/build.nix

This file was deleted.

7 changes: 7 additions & 0 deletions conductor/node/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ pkgs }:
{
buildInputs = []
++ (pkgs.callPackage ./install { }).buildInputs
++ (pkgs.callPackage ./test { }).buildInputs
;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ pkgs }:
let
pkgs = import ../../../nixpkgs/nixpkgs.nix;

name = "hc-conductor-node-install";

script = pkgs.writeShellScriptBin name
Expand All @@ -9,4 +8,6 @@ let
./scripts/build_nodejs_conductor.sh
'';
in
script
{
buildInputs = [ script ];
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ pkgs }:
let
pkgs = import ../../../nixpkgs/nixpkgs.nix;

name = "hc-conductor-node-test";

script = pkgs.writeShellScriptBin name
''
hc-conductor-node-install && ( cd nodejs_conductor && npm test );
'';
in
script
{
buildInputs = [ script ];
}
8 changes: 0 additions & 8 deletions conductor/rust/build.nix

This file was deleted.

7 changes: 7 additions & 0 deletions conductor/rust/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ pkgs }:
{
buildInputs = []
++ (pkgs.callPackage ./install { }).buildInputs
++ (pkgs.callPackage ./uninstall { }).buildInputs
;
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ pkgs }:
let
pkgs = import ../../../nixpkgs/nixpkgs.nix;

name = "hc-conductor-rust-install";

script = pkgs.writeShellScriptBin name
''
cargo build -p holochain --release && cargo install -f --path conductor
'';
in
script
{
buildInputs = [ script ];
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ pkgs }:
let
pkgs = import ../../../nixpkgs/nixpkgs.nix;

name = "hc-conductor-rust-uninstall";

script = pkgs.writeShellScriptBin name
Expand All @@ -9,4 +8,6 @@ let
rm -f $CARGO_HOME/bin/holochain
'';
in
script
{
buildInputs = [ script ];
}
12 changes: 0 additions & 12 deletions conductor/wasm/build.nix

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ pkgs }:
let
pkgs = import ../../../nixpkgs/nixpkgs.nix;

name = "hc-conductor-wasm-compile";

script = pkgs.writeShellScriptBin name
Expand All @@ -10,4 +9,6 @@ let
wasm-bindgen target/wasm32-unknown-unknown/release/holochain_conductor_wasm.wasm --out-dir conductor_wasm/npm_package/gen --nodejs
'';
in
script
{
buildInputs = [ script ];
}
9 changes: 9 additions & 0 deletions conductor/wasm/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{ pkgs }:
{
buildInputs = []
++ (pkgs.callPackage ./compile { }).buildInputs
++ (pkgs.callPackage ./install { }).buildInputs
++ (pkgs.callPackage ./test { }).buildInputs
++ (pkgs.callPackage ./uninstall { }).buildInputs
;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ pkgs }:
let
pkgs = import ../../../nixpkgs/nixpkgs.nix;

name = "hc-conductor-wasm-install";

version = "0.2.32";
Expand All @@ -15,18 +14,20 @@ let
# drop the incorrect version of wasm-bindgen
if installed && ! correct-version;
then
then
hc-conductor-wasm-uninstall;
fi;
# install the correct version of wasm-bindgen
if ! installed;
then
then
cargo install wasm-bindgen-cli --version "${version}";
fi;
# report the installed version
wasm-bindgen -V;
'';
in
script
{
buildInputs = [ script ];
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ pkgs }:
let
pkgs = import ../../../nixpkgs/nixpkgs.nix;

name = "hc-conductor-wasm-test";

script = pkgs.writeShellScriptBin name
Expand All @@ -9,4 +8,6 @@ let
( cd ./conductor_wasm/npm_package && npm install && npm test );
'';
in
script
{
buildInputs = [ script ];
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ pkgs }:
let
pkgs = import ../../../nixpkgs/nixpkgs.nix;

name = "hc-conductor-wasm-uninstall";

script = pkgs.writeShellScriptBin name
''
cargo uninstall wasm-bindgen-cli
'';
in
script
{
buildInputs = [ script ];
}
9 changes: 0 additions & 9 deletions darwin/build.nix

This file was deleted.

10 changes: 0 additions & 10 deletions darwin/config.nix

This file was deleted.

12 changes: 12 additions & 0 deletions darwin/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ pkgs }:
let
# https://stackoverflow.com/questions/51161225/how-can-i-make-macos-frameworks-available-to-clang-in-a-nix-environment
frameworks = if pkgs.stdenv.isDarwin then pkgs.darwin.apple_sdk.frameworks else {};
ld-flags = if pkgs.stdenv.isDarwin then "-F${frameworks.CoreFoundation}/Library/Frameworks -framework CoreFoundation " else "";
in
{
frameworks = frameworks;
ld-flags = ld-flags;
buildInputs = []
++ pkgs.lib.optionals pkgs.stdenv.isDarwin [ frameworks.Security frameworks.CoreFoundation frameworks.CoreServices ];
}
Loading

0 comments on commit 312777b

Please sign in to comment.