about summary refs log tree commit diff
path: root/boilerplate/typescript/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'boilerplate/typescript/default.nix')
-rw-r--r--boilerplate/typescript/default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/boilerplate/typescript/default.nix b/boilerplate/typescript/default.nix
new file mode 100644
index 000000000000..827056a913be
--- /dev/null
+++ b/boilerplate/typescript/default.nix
@@ -0,0 +1,19 @@
+let
+  pkgs = import <nixpkgs> {};
+in pkgs.stdenv.mkDerivation {
+  name = "ideal-website";
+  srcs = ./.;
+  buildInputs = with pkgs; [
+    nodejs
+    # Exposes lscpu for parcel.js
+    utillinux
+  ];
+  # parcel.js needs number of CPUs
+  PARCEL_WORKERS = "1";
+  buildPhase = ''
+    npx parcel build index.html
+  '';
+  installPhase = ''
+    mv dist $out
+  '';
+}