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 <[email protected]>
  • Loading branch information
katexochen committed Mar 13, 2024
1 parent 6060b37 commit e6238bf
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions packages/by-name/contrast-docs/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ lib
, fetchYarnDeps
, mkYarnPackage
, contrast
}:

mkYarnPackage rec {
pname = "contrast-docs";
version = 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 e6238bf

Please sign in to comment.