2020-03-25 17:47:30 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
name = "typescript";
|
2020-03-23 23:12:18 +01:00
|
|
|
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-23 23:12:18 +01:00
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mv dist $out
|
|
|
|
'';
|
|
|
|
}
|