diff --git a/pkgs/development/erlang-modules/build-hex.nix b/pkgs/development/erlang-modules/build-hex.nix index 6a1f4172bbd..6fd8983d411 100644 --- a/pkgs/development/erlang-modules/build-hex.nix +++ b/pkgs/development/erlang-modules/build-hex.nix @@ -16,12 +16,7 @@ stdenv.mkDerivation (attrs // { buildInputs = buildInputs ++ [ erlang rebar3 openssl libyaml ]; postPatch = let - registrySnapshot = fetchFromGitHub { - owner = "gleber"; - repo = "hex-pm-registry-snapshots"; - rev = "48147b0"; - sha256 = "0ibfnhrhbka4n6wkhs99fpy3sjab54ip37jgvx2hcfhfr4pxhbxw"; - }; + registrySnapshot = import ./registrySnapshot.nix { inherit fetchFromGitHub; }; in '' rm -f rebar rebar3 if [ -e "src/${name}.app.src" ]; then diff --git a/pkgs/development/erlang-modules/registrySnapshot.nix b/pkgs/development/erlang-modules/registrySnapshot.nix new file mode 100644 index 00000000000..cca3dd0c56b --- /dev/null +++ b/pkgs/development/erlang-modules/registrySnapshot.nix @@ -0,0 +1,8 @@ +{ fetchFromGitHub }: + +fetchFromGitHub { + owner = "gleber"; + repo = "hex-pm-registry-snapshots"; + rev = "48147b0"; + sha256 = "0ibfnhrhbka4n6wkhs99fpy3sjab54ip37jgvx2hcfhfr4pxhbxw"; +}