2020-03-25 17:30:22 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation {
|
2020-03-25 18:04:41 +01:00
|
|
|
name = "goals-webpage";
|
|
|
|
srcs = ./.;
|
|
|
|
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
|
|
|
'';
|
|
|
|
}
|