# Pastebin RFGy1ABP commento-frontend = pkgs.mkYarnPackage { NODE_ENV = "production"; name = "commento-frontend"; src = "${pkgSrc}/frontend"; packageJSON = "${pkgSrc}/frontend/package.json"; yarnLock = "${pkgSrc}/frontend/yarn.lock"; yarnPreBuild = '' mkdir -p $HOME/.node-gyp/${pkgs.nodejs.version} echo 9 > $HOME/.node-gyp/${pkgs.nodejs.version}/installVersion ln -sfv ${pkgs.nodejs}/include $HOME/.node-gyp/${pkgs.nodejs.version} ''; pkgConfig = { node-sass = { buildInputs = [ pkgs.python ]; postInstall = '' yarn --offline run build rm build/config.gypi ''; }; }; dontFixup = true; dontStrip = true; dontCopyDist = true; installPhase = '' sed -i "s+node_modules+$(pwd)/node_modules+g" ./deps/commento/gulpfile.js $(pwd)/node_modules/.bin/gulp prod --gulpfile ./deps/commento/gulpfile.js mkdir -p $out/dist cp -r ./deps/commento/build/prod/* $out/dist ls -l $out/dist ''; };