about summary refs log tree commit diff
path: root/boilerplate/typescript
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-25T16·47+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-25T17·01+0000
commitcd06990fe3cad2d3098bc1964f2b7185e4491cfa (patch)
treecbb395caba40cc5f862e62060124aa3f3bbbcda8 /boilerplate/typescript
parentd7cc1f03de8ca985564ad7dcc2d73317a046f583 (diff)
Debug typescript/default.nix
TL;DR
- Change derivation name
- Point to $src/index.html instead of non-existent index.html
- Prefer defining pkgs as a function argument
Diffstat (limited to 'boilerplate/typescript')
-rw-r--r--boilerplate/typescript/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/boilerplate/typescript/default.nix b/boilerplate/typescript/default.nix
index 827056a913be..b7aaf0a57763 100644
--- a/boilerplate/typescript/default.nix
+++ b/boilerplate/typescript/default.nix
@@ -1,7 +1,7 @@
-let
-  pkgs = import <nixpkgs> {};
-in pkgs.stdenv.mkDerivation {
-  name = "ideal-website";
+{ pkgs, ... }:
+
+pkgs.stdenv.mkDerivation {
+  name = "typescript";
   srcs = ./.;
   buildInputs = with pkgs; [
     nodejs
@@ -11,7 +11,7 @@ in pkgs.stdenv.mkDerivation {
   # parcel.js needs number of CPUs
   PARCEL_WORKERS = "1";
   buildPhase = ''
-    npx parcel build index.html
+    npx parcel build $src/index.html
   '';
   installPhase = ''
     mv dist $out