blob: f3cb5627a2d8cd75d14958a6190afea63e1fb1a9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{ pkgs ? import <nixpkgs> {} }:
let
nodeDependencies = (pkgs.callPackage ./front/default.nix {}).nodeDependencies;
stdenv = pkgs.stdenv;
nodejs = pkgs.nodejs;
tsc = pkgs.typescript;
in
stdenv.mkDerivation {
name = "duckonaut.dev-front";
src = ./front;
buildInputs = [nodejs tsc];
buildPhase = ''
ln -s ${nodeDependencies}/lib/node_modules ./node_modules
export PATH="${nodeDependencies}/bin:$PATH"
echo "PATH: $PATH"
# Build the distribution bundle in "dist"
npm run build
cp -r dist $out/
'';
}
|