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