ligo/nix/ligo-website.nix
Alexander Bantyev edb3fce642 Add nix as a build system
* Dynamically linked executables (ligo-bin)
* Statically linked executables (ligo-static)
* Docker (ligo-docker)
* deb package (ligo-deb)
* webide (ligo-editor)
* webide docker (ligo-editor-docker)
* website (ligo-website)
2020-04-29 19:40:04 +01:00

19 lines
563 B
Nix

{ buildNpmPackage, writeShellScriptBin, yarn, linkFarm, nodejs-slim, python2
, ligo-doc, ligo-deb, ligo-static }:
buildNpmPackage {
src = ../gitlab-pages/website;
npmBuild = "npm run build";
preBuild = ''
cp -r ${../gitlab-pages/docs} $NIX_BUILD_TOP/docs
chmod 700 -R $NIX_BUILD_TOP/docs
'';
installPhase = ''
cp -Lr build $out
cp -r ${ligo-deb}/* $out/deb
mkdir -p $out/bin/linux
cp -r ${ligo-static}/bin/ligo $out/bin/linux/ligo
cp -r ${ligo-doc}/share/doc $out/odoc
'';
extraEnvVars.nativeBuildInputs = [ python2 ];
}