2020-03-25 17:30:22 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation {
|
2020-03-25 18:04:41 +01:00
|
|
|
name = "goals-webpage";
|
2020-07-02 14:28:59 +02:00
|
|
|
src = builtins.path { path = ./.; name = "goals"; };
|
2020-03-25 18:04:41 +01:00
|
|
|
buildInputs = with pkgs; [
|
|
|
|
nodejs
|
|
|
|
# Exposes lscpu for parcel.js
|
|
|
|
utillinux
|
|
|
|
];
|
|
|
|
# parcel.js needs number of CPUs
|
|
|
|
PARCEL_WORKERS = "1";
|
|
|
|
buildPhase = ''
|
2020-03-25 18:18:51 +01:00
|
|
|
npx parcel build src/index.html --public-url ./
|
2020-03-25 18:04:41 +01:00
|
|
|
'';
|
2020-03-25 17:30:22 +01:00
|
|
|
installPhase = ''
|
2020-03-25 18:04:41 +01:00
|
|
|
mv dist $out
|
2020-03-25 17:30:22 +01:00
|
|
|
'';
|
|
|
|
}
|