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
This commit is contained in:
William Carroll 2020-03-25 16:47:30 +00:00
parent d7cc1f03de
commit cd06990fe3

View file

@ -1,7 +1,7 @@
let { pkgs, ... }:
pkgs = import <nixpkgs> {};
in pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {
name = "ideal-website"; name = "typescript";
srcs = ./.; srcs = ./.;
buildInputs = with pkgs; [ buildInputs = with pkgs; [
nodejs nodejs
@ -11,7 +11,7 @@ in pkgs.stdenv.mkDerivation {
# parcel.js needs number of CPUs # parcel.js needs number of CPUs
PARCEL_WORKERS = "1"; PARCEL_WORKERS = "1";
buildPhase = '' buildPhase = ''
npx parcel build index.html npx parcel build $src/index.html
''; '';
installPhase = '' installPhase = ''
mv dist $out mv dist $out