2023-06-03 08:24:05 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, fetchYarnDeps
|
|
|
|
, runCommand
|
|
|
|
, nodejs
|
|
|
|
, yarn
|
|
|
|
, path
|
|
|
|
, nodePackages
|
|
|
|
}:
|
|
|
|
let
|
2023-06-05 17:19:43 +00:00
|
|
|
pinData = import ../srcs/pin.nix;
|
|
|
|
inherit (pinData) erpnextVersion;
|
|
|
|
inherit (pinData.hashes) erpnextSrcHash;
|
2023-07-17 19:10:27 +00:00
|
|
|
inherit (pinData.hashes) erpnextYarnHash;
|
2023-06-05 17:19:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frappe";
|
|
|
|
repo = "erpnext";
|
|
|
|
rev = "v${erpnextVersion}";
|
2023-07-17 19:10:27 +00:00
|
|
|
sha256 = erpnextSrcHash;
|
2023-06-05 17:19:43 +00:00
|
|
|
};
|
|
|
|
|
2023-06-03 08:24:05 +00:00
|
|
|
offlineCache = fetchYarnDeps {
|
|
|
|
yarnLock = "${src}/yarn.lock";
|
2023-07-17 19:10:27 +00:00
|
|
|
sha256 = erpnextYarnHash;
|
2023-06-03 08:24:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
mkApp = import ./mk-app.nix {
|
|
|
|
inherit path runCommand nodejs yarn nodePackages;
|
|
|
|
};
|
|
|
|
in mkApp "erpnext" src offlineCache
|