From 7a8f3ce0f44a82fbc9391bb955bb7b51cdbf6e61 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:54:35 +0100 Subject: [PATCH] packages: init contrast-docs Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- packages/by-name/contrast-docs/package.nix | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 packages/by-name/contrast-docs/package.nix diff --git a/packages/by-name/contrast-docs/package.nix b/packages/by-name/contrast-docs/package.nix new file mode 100644 index 0000000000..e5e6f3caf2 --- /dev/null +++ b/packages/by-name/contrast-docs/package.nix @@ -0,0 +1,34 @@ +{ fetchYarnDeps +, mkYarnPackage +, contrast +}: + +mkYarnPackage rec { + pname = "contrast-docs"; + inherit (contrast) version; + + src = ../../../docs; + + packageJSON = "${src}/package.json"; + offlineCache = fetchYarnDeps { + yarnLock = "${src}/yarn.lock "; + hash = "sha256-8TkRMs8TpF53ehJ1WlXf/AHcGfgD7KCjbH6ZlZDKo0E="; + }; + + configurePhase = '' + cp -r $node_modules node_modules + chmod +w node_modules + ''; + + buildPhase = '' + export HOME=$(mktemp -d) + yarn --offline build + ''; + + distPhase = "true"; + + installPhase = '' + mkdir -p $out + cp -R build/* $out + ''; +}