2020-03-30 21:28:38 +02:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
name = "typescript";
|
2020-07-02 14:28:59 +02:00
|
|
|
srcs = builtins.path { path = ./.; name = "habitgarden"; };
|
2020-03-30 21:28:38 +02: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
|
|
|
|
'';
|
|
|
|
}
|