nixpkgs/pkgs/servers/mail/listmonk/frontend.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
802 B
Nix
Raw Normal View History

2022-08-06 00:41:24 +02:00
{ yarn2nix-moretea
, fetchFromGitHub
2023-09-06 18:27:00 +02:00
, fetchYarnDeps
2022-08-06 00:41:24 +02:00
, meta
}:
yarn2nix-moretea.mkYarnPackage rec {
pname = "listmonk-frontend";
version = "2.5.1";
2022-08-06 00:41:24 +02:00
src = fetchFromGitHub {
owner = "knadh";
repo = "listmonk";
rev = "v${version}";
sha256 = "sha256-gCnIblc83CmG1auvYYxqW/xBl6Oy1KHGkqSY/3yIm3I=";
2022-08-06 00:41:24 +02:00
};
packageJSON = ./package.json;
2023-09-06 18:27:00 +02:00
yarnLock = "${src}/frontend/yarn.lock";
offlineCache = fetchYarnDeps {
inherit yarnLock;
hash = "sha256-KKNk4lrM7unMFClkY6F3nqhKx5xfx87Ac+rug9sOwvI=";
};
2022-08-06 00:41:24 +02:00
# For Node.js v17+, this is necessary.
NODE_OPTIONS = "--openssl-legacy-provider";
2022-08-06 00:41:24 +02:00
installPhase = ''
runHook preInstall
2022-08-06 00:41:24 +02:00
cd deps/listmonk-frontend/frontend
npm run build
mv dist $out
runHook postInstall
2022-08-06 00:41:24 +02:00
'';
doDist = false;
inherit meta;
}