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 = 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