diff options
author | Yureka <yuka@yuka.dev> | 2021-10-12 01:56:16 +0200 |
---|---|---|
committer | Yuka <yuka@yuka.dev> | 2021-10-20 11:39:16 +0200 |
commit | 84e02be598d10f59a8320ee60a3d2efc31339ce2 (patch) | |
tree | a870465a1e43418967aeaa4404a6c5b79f738628 /pkgs/development/tools/yarn2nix-moretea/yarn2nix | |
parent | cf6f772676b4f3cc7bcd04eb75dadcea85c2cb01 (diff) |
fetchYarnDeps, mkYarnModules: verify the FOD hash is up-to-date
Diffstat (limited to 'pkgs/development/tools/yarn2nix-moretea/yarn2nix')
-rw-r--r-- | pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix b/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix index 8097f2b364c21..0d0e2baccc70f 100644 --- a/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix +++ b/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix @@ -108,7 +108,12 @@ in rec { dontInstall = true; buildInputs = [ yarn nodejs git ] ++ extraBuildInputs; - configurePhase = '' + configurePhase = lib.optionalString (offlineCache ? outputHash) '' + if ! cmp -s ${yarnLock} ${offlineCache}/yarn.lock; then + echo "yarn.lock changed, you need to update the fetchYarnDeps hash" + exit 1 + fi + '' + '' # Yarn writes cache directories etc to $HOME. export HOME=$PWD/yarn_home ''; |