2020-03-27 19:26:27 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
name = "typescript";
|
2020-07-02 14:28:59 +02:00
|
|
|
srcs = builtins.path { path = ./.; name = "day-of-week-habits"; };
|
2020-03-27 19:26:27 +01:00
|
|
|
buildInputs = with pkgs; [
|
|
|
|
nodejs
|
|
|
|
# Exposes lscpu for parcel.js
|
|
|
|
utillinux
|
|
|
|
];
|
|
|
|
# parcel.js needs number of CPUs
|
|
|
|
PARCEL_WORKERS = "1";
|
|
|
|
buildPhase = ''
|
|
|
|
npx parcel build src/index.html --public-url ./
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mv dist $out
|
|
|
|
'';
|
|
|
|
}
|