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:
		
							parent
							
								
									d7cc1f03de
								
							
						
					
					
						commit
						cd06990fe3
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue