From cc7508806340ffc0bb4fca4fd2f7490d8a4ee373 Mon Sep 17 00:00:00 2001 From: Michael Bishop Date: Mon, 7 Jun 2021 12:32:15 -0300 Subject: [PATCH] generate the correct hash for the directory --- yarn2nix.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/yarn2nix.nix b/yarn2nix.nix index fe5e7c1d39..7d020df392 100644 --- a/yarn2nix.nix +++ b/yarn2nix.nix @@ -32,14 +32,16 @@ let }; newPackagePath = builtins.toFile "package.json" (builtins.toJSON newPackage); windowsElectronVersion = "13.1.0"; + electronPath = "https://github.com/electron/electron/releases/download/v${windowsElectronVersion}"; windowsElectron = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${windowsElectronVersion}/electron-v${windowsElectronVersion}-win32-x64.zip"; + url = "${electronPath}/electron-v${windowsElectronVersion}-win32-x64.zip"; sha256 = "dea5e784471828dedb294801f0d35a11459b2a940b6b60ed80c2c19eccd4d8f2"; }; + electronPathHash = builtins.hashString "sha256" electronPath; electron-cache = runCommand "electron-cache" {} '' # newer style - mkdir -p $out/1b59b9d597244fba44a70d503e66a7c53bd89d9f254d93edc3be03fd366152ac/ - ln -sv ${windowsElectron} $out/1b59b9d597244fba44a70d503e66a7c53bd89d9f254d93edc3be03fd366152ac/electron-v${windowsElectronVersion}-win32-x64.zip + mkdir -p $out/${electronPathHash}/ + ln -sv ${windowsElectron} $out/${electronPathHash}/electron-v${windowsElectronVersion}-win32-x64.zip ''; electron-gyp = fetchurl { url = "https://www.electronjs.org/headers/v13.1.0/node-v13.1.0-headers.tar.gz";