fetchMixDeps: transition to hash

This commit is contained in:
happysalada 2023-06-04 18:28:35 -04:00 committed by Yt
parent 82801fe331
commit 6a050b80fa
5 changed files with 13 additions and 8 deletions

View File

@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
pname = "mix-deps-${pname}";
mixEnv = "test";
src = "${src}/app/server/beam/tau";
sha256 = "sha256-MvwUyVTS23vQKLpGxz46tEVCs/OyYk5dDaBlv+kYg1M=";
hash = "sha256-MvwUyVTS23vQKLpGxz46tEVCs/OyYk5dDaBlv+kYg1M=";
};
strictDeps = true;

View File

@ -21,7 +21,7 @@ mixRelease {
mixFodDeps = fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version elixir;
sha256 = "sha256-jF1Plkz1D85aWkiNgeBlJmHndhr7us+8+m/gMkXHvDw=";
hash = "sha256-jF1Plkz1D85aWkiNgeBlJmHndhr7us+8+m/gMkXHvDw=";
};
# elixir-ls is an umbrella app

View File

@ -2,7 +2,8 @@
{ pname
, version
, sha256
, hash ? ""
, sha256 ? ""
, src
, mixEnv ? "prod"
, debug ? false
@ -13,6 +14,12 @@
, ...
}@attrs:
let
hash_ =
if hash != "" then { outputHashAlgo = null; outputHash = hash; }
else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; }
else { outputHashAlgo = "sha256"; outputHash = lib.fakeSha256; };
in
stdenvNoCC.mkDerivation (attrs // {
nativeBuildInputs = [ elixir hex cacert git ];
@ -51,10 +58,8 @@ stdenvNoCC.mkDerivation (attrs // {
runHook postInstall
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = sha256;
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
inherit meta;
})
} // hash_)

View File

@ -19,7 +19,7 @@ beamPackages.mixRelease rec {
mixFodDeps = beamPackages.fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version;
sha256 = "rwWGs4fGeuyV6BBFgCyyDwKf/YLgs1wY0xnHYy8iioE=";
hash = "sha256-rwWGs4fGeuyV6BBFgCyyDwKf/YLgs1wY0xnHYy8iioE=";
};
installPhase = ''

View File

@ -25,7 +25,7 @@ let
mixFodDeps = beamPackages.fetchMixDeps {
pname = "${pname}-deps";
inherit src version;
sha256 = "1ikcskp4gvvdprl65x1spijdc8dz6klnrnkvgy2jbk0b3d7yn1v5";
hash = "sha256-ZQfrTxsLzCWFf3vabOk0vyHWZLw69GJovm3vR+7UbMY=";
};
yarnDeps = mkYarnModules {