mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-07 06:12:58 +00:00
38 lines
553 B
Nix
38 lines
553 B
Nix
{ mkYarnPackage
|
|
, fetchYarnDeps
|
|
, meta
|
|
, version
|
|
, src
|
|
}:
|
|
|
|
mkYarnPackage {
|
|
pname = "listmonk-frontend";
|
|
inherit version;
|
|
|
|
src = "${src}/frontend";
|
|
packageJSON = ./package.json;
|
|
|
|
offlineCache = fetchYarnDeps {
|
|
yarnLock = "${src}/frontend/yarn.lock";
|
|
hash = "sha256-TdrglyRtb2Q8SFtoiCoDj/zBV2+7DwzIm/Fzlt0ZvSo=";
|
|
};
|
|
|
|
configurePhase = ''
|
|
ln -s $node_modules node_modules
|
|
'';
|
|
|
|
buildPhase = ''
|
|
yarn --offline build
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir $out
|
|
cp -R dist/* $out
|
|
'';
|
|
|
|
doDist = false;
|
|
|
|
|
|
inherit meta;
|
|
}
|