diff options
author | William Carroll <wpcarro@gmail.com> | 2020-03-24T13·27+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-03-24T13·27+0000 |
commit | 527aeeeced9fdcc2fc3a6a08c58ceb3a17ae2122 (patch) | |
tree | 0d7d31079c2b7e1791e4726ca47ff25a812e325e /website/sandbox/contentful/default.nix | |
parent | 57b58e9b2fe2a1b178f42bc16d7c5ab1f8da9cdd (diff) |
Add sandbox project using Contentful CMS
I used the boilerplate/typescript project as a starting point. This project fetches and renders books that I'm defining in a Contentful CMS that I created.
Diffstat (limited to 'website/sandbox/contentful/default.nix')
-rw-r--r-- | website/sandbox/contentful/default.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/website/sandbox/contentful/default.nix b/website/sandbox/contentful/default.nix new file mode 100644 index 000000000000..827056a913be --- /dev/null +++ b/website/sandbox/contentful/default.nix @@ -0,0 +1,19 @@ +let + pkgs = import <nixpkgs> {}; +in pkgs.stdenv.mkDerivation { + name = "ideal-website"; + srcs = ./.; + 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 + ''; +} |