erpnext-nix/node/frappe-app.nix

30 lines
611 B
Nix
Raw Normal View History

2023-06-03 08:24:05 +00:00
{ fetchFromGitHub
, fetchYarnDeps
, runCommand
, nodejs
, yarn
, path
, nodePackages
}:
let
pinData = import ../srcs/pin.nix;
inherit (pinData) frappeVersion;
inherit (pinData.hashes) frappeSrcHash;
inherit (pinData.hashes) frappeYarnHash;
src = fetchFromGitHub {
owner = "frappe";
repo = "frappe";
rev = "v${frappeVersion}";
sha256 = frappeSrcHash;
};
2023-06-03 08:24:05 +00:00
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
sha256 = frappeYarnHash;
2023-06-03 08:24:05 +00:00
};
mkApp = import ./mk-app.nix {
inherit path runCommand nodejs yarn nodePackages;
};
in mkApp "frappe" src offlineCache