Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ overview-slides.html : overview-slides.md
# # -V maxScale=2

base:
mo-doc --source $(MOTOKO_CORE) --output $(OUT)/core --format plain
mo-doc --source $(MOTOKO_BASE) --output $(OUT)/base --format plain

html:
Expand Down
17 changes: 17 additions & 0 deletions flake.lock

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

17 changes: 14 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
url = "github:dfinity/motoko-base/next-moc";
flake = false;
};
motoko-core-src = {
url = "github:dfinity/new-motoko-base";
flake = false;
};
motoko-matchers-src = {
url = "github:kritzcreek/motoko-matchers";
flake = false;
Expand Down Expand Up @@ -72,6 +76,7 @@
, ic-wasm-src
, libtommath-src
, motoko-base-src
, motoko-core-src
, motoko-matchers-src
, ocaml-vlq-src
, wasm-spec-src
Expand All @@ -87,6 +92,7 @@
ic-wasm-src
libtommath-src
motoko-base-src
motoko-core-src
motoko-matchers-src
ocaml-vlq-src
wasm-spec-src
Expand Down Expand Up @@ -168,9 +174,14 @@
paths = [ "${pkgs.sources.motoko-base-src}/src" ];
};

core-src = pkgs.symlinkJoin {
name = "core-src";
paths = [ "${pkgs.sources.motoko-core-src}/src" ];
};

js = import ./nix/moc.js.nix { inherit pkgs commonBuildInputs rts; };

docs = import ./nix/docs.nix { inherit pkgs js base-src; };
docs = import ./nix/docs.nix { inherit pkgs js base-src core-src; };

checks = {
check-formatting = import ./nix/check-formatting.nix { inherit pkgs; };
Expand All @@ -182,7 +193,7 @@
nix-update = nix-update-flake.packages.${system}.default;

shell = import ./nix/shell.nix {
inherit pkgs nix-update base-src llvmEnv esm viper-server commonBuildInputs rts js debugMoPackages docs;
inherit pkgs nix-update base-src core-src llvmEnv esm viper-server commonBuildInputs rts js debugMoPackages docs;
inherit (checks) check-rts-formatting;
};

Expand All @@ -192,7 +203,7 @@
base-doc = import ./nix/base-doc.nix { inherit pkgs; inherit (debugMoPackages) mo-doc; };
report-site = import ./nix/report-site.nix { inherit pkgs base-doc docs; inherit (tests) coverage; };

inherit rts base-src docs shell;
inherit rts base-src core-src docs shell;
};
in
{
Expand Down
18 changes: 18 additions & 0 deletions nix/core-doc.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{ pkgs, mo-doc }:
pkgs.stdenv.mkDerivation {
name = "core-doc";
src = pkgs.sources.motoko-core-src;
phases = "unpackPhase buildPhase installPhase";
doCheck = true;
buildInputs = [ mo-doc ];
buildPhase = ''
mo-doc
'';
installPhase = ''
mkdir -p $out
cp -rv docs/* $out/

mkdir -p $out/nix-support
echo "report docs $out index.html" >> $out/nix-support/hydra-build-products
'';
}
3 changes: 2 additions & 1 deletion nix/docs.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, js, base-src }:
{ pkgs, js, base-src, core-src }:
pkgs.stdenv.mkDerivation {
name = "docs";
src = ../doc;
Expand All @@ -9,6 +9,7 @@ pkgs.stdenv.mkDerivation {
export HOME=$PWD
export MOC_JS=${js.moc}/bin/moc.js
export MOTOKO_BASE=${base-src}
export MOTOKO_CORE=${core-src}
make
'';

Expand Down
2 changes: 2 additions & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ pkgs
, nix-update
, base-src
, core-src
, llvmEnv
, esm
, viper-server
Expand Down Expand Up @@ -80,6 +81,7 @@ pkgs.mkShell {
TOMMATHSRC = pkgs.sources.libtommath-src;
LOCALE_ARCHIVE = pkgs.lib.optionalString pkgs.stdenv.isLinux "${pkgs.glibcLocales}/lib/locale/locale-archive";
MOTOKO_BASE = base-src;
MOTOKO_CORE = core-src;
CANDID_TESTS = "${pkgs.sources.candid-src}/test";
VIPER_SERVER = "${viper-server}";

Expand Down