Skip to content

Commit

Permalink
packages: init contrast-docs
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
  • Loading branch information
katexochen committed Mar 13, 2024
1 parent 6060b37 commit 7a8f3ce
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions packages/by-name/contrast-docs/package.nix
Original file line number Diff line number Diff line change
@@ -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
'';
}

0 comments on commit 7a8f3ce

Please sign in to comment.