Skip to content

Commit

Permalink
Temporarily disable base lib building
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-blaeser committed Nov 30, 2024
1 parent fe50a61 commit 8c244af
Showing 1 changed file with 69 additions and 70 deletions.
139 changes: 69 additions & 70 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -663,75 +663,75 @@ EOF
installPhase = "touch $out";
};

base-src = nixpkgs.symlinkJoin {
name = "base-src";
paths = "${nixpkgs.sources.motoko-base}/src";
};

base-tests = stdenv.mkDerivation {
name = "base-tests";
src = nixpkgs.sources.motoko-base;
phases = "unpackPhase checkPhase installPhase";
doCheck = true;
installPhase = "touch $out";
checkInputs = [
nixpkgs.wasmtime
moc
];
checkPhase = ''
make MOC=moc VESSEL_PKGS="--package matchers ${nixpkgs.sources.motoko-matchers}/src" -C test
'';
};

guide-examples-tc = stdenv.mkDerivation {
name = "guid-examples-tc";
src = subpath ./doc/md/examples;
phases = "unpackPhase checkPhase installPhase";
doCheck = true;
MOTOKO_BASE = base-src;
installPhase = "touch $out";
checkInputs = [
moc
];
checkPhase = ''
patchShebangs .
./check.sh
'';
};

base-doc = stdenv.mkDerivation {
name = "base-doc";
src = nixpkgs.sources.motoko-base;
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
'';
};

report-site = nixpkgs.runCommandNoCC "report-site" {
buildInputs = [ nixpkgs.tree ];
} ''
mkdir -p $out
ln -s ${base-doc} $out/base-doc
ln -s ${docs} $out/docs
ln -s ${tests.coverage} $out/coverage
cd $out;
# generate a simple index.html, listing the entry points
( echo docs/overview-slides.html;
echo docs/html/motoko.html;
echo base-doc/
echo coverage/ ) | \
tree -H . -l --fromfile -T "Motoko build reports" > index.html
'';
# base-src = nixpkgs.symlinkJoin {
# name = "base-src";
# paths = "${nixpkgs.sources.motoko-base}/src";
# };
#
# base-tests = stdenv.mkDerivation {
# name = "base-tests";
# src = nixpkgs.sources.motoko-base;
# phases = "unpackPhase checkPhase installPhase";
# doCheck = true;
# installPhase = "touch $out";
# checkInputs = [
# nixpkgs.wasmtime
# moc
# ];
# checkPhase = ''
# make MOC=moc VESSEL_PKGS="--package matchers ${nixpkgs.sources.motoko-matchers}/src" -C test
# '';
# };
#
# guide-examples-tc = stdenv.mkDerivation {
# name = "guid-examples-tc";
# src = subpath ./doc/md/examples;
# phases = "unpackPhase checkPhase installPhase";
# doCheck = true;
# MOTOKO_BASE = base-src;
# installPhase = "touch $out";
# checkInputs = [
# moc
# ];
# checkPhase = ''
# patchShebangs .
# ./check.sh
# '';
# };
#
# base-doc = stdenv.mkDerivation {
# name = "base-doc";
# src = nixpkgs.sources.motoko-base;
# 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
# '';
# };
#
# report-site = nixpkgs.runCommandNoCC "report-site" {
# buildInputs = [ nixpkgs.tree ];
# } ''
# mkdir -p $out
# ln -s ${base-doc} $out/base-doc
# ln -s ${docs} $out/docs
# ln -s ${tests.coverage} $out/coverage
# cd $out;
# # generate a simple index.html, listing the entry points
# ( echo docs/overview-slides.html;
# echo docs/html/motoko.html;
# echo base-doc/
# echo coverage/ ) | \
# tree -H . -l --fromfile -T "Motoko build reports" > index.html
# '';

check-generated = nixpkgs.runCommandNoCC "check-generated" {
nativeBuildInputs = [ nixpkgs.diffutils ];
Expand Down Expand Up @@ -855,7 +855,6 @@ EOF
TOMMATHSRC = nixpkgs.sources.libtommath;
LOCALE_ARCHIVE = nixpkgs.lib.optionalString stdenv.isLinux "${nixpkgs.glibcLocales}/lib/locale/locale-archive";
# TODO: Reenable when Motoko base library has been lifted to stable functions.
# MOTOKO_BASE = base-src;
CANDID_TESTS = "${nixpkgs.sources.candid}/test";
VIPER_SERVER = "${viperServer}";

Expand Down

0 comments on commit 8c244af

Please sign in to comment.