2020-03-24 14:27:30 +01:00
|
|
|
let
|
|
|
|
pkgs = import <nixpkgs> {};
|
|
|
|
in pkgs.stdenv.mkDerivation {
|
|
|
|
name = "ideal-website";
|
2020-07-02 14:28:59 +02:00
|
|
|
src = builtins.path { path = ./.; name = "contentful"; };
|
2020-03-24 14:27:30 +01:00
|
|
|
buildInputs = with pkgs; [
|
|
|
|
nodejs
|
|
|
|
# Exposes lscpu for parcel.js
|
|
|
|
utillinux
|
|
|
|
];
|
|
|
|
# parcel.js needs number of CPUs
|
|
|
|
PARCEL_WORKERS = "1";
|
|
|
|
buildPhase = ''
|
|
|
|
npx parcel build index.html
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mv dist $out
|
|
|
|
'';
|
|
|
|
}
|