about summary refs log tree commit diff
path: root/users/wpcarro/website/sandbox/contentful/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/wpcarro/website/sandbox/contentful/default.nix')
-rw-r--r--users/wpcarro/website/sandbox/contentful/default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/users/wpcarro/website/sandbox/contentful/default.nix b/users/wpcarro/website/sandbox/contentful/default.nix
new file mode 100644
index 000000000000..f7125655ccdc
--- /dev/null
+++ b/users/wpcarro/website/sandbox/contentful/default.nix
@@ -0,0 +1,19 @@
+{ pkgs, ... }:
+
+pkgs.stdenv.mkDerivation {
+  name = "ideal-website";
+  src = builtins.path { path = ./.; name = "contentful"; };
+  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
+  '';
+}