2016-03-28 23:14:13 +02:00
|
|
|
{stdenv, writeText, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-11-05 00:38:42 +01:00
|
|
|
pname = "hex-registry";
|
2018-07-12 21:48:43 +02:00
|
|
|
rev = "11d7a24e9f53f52490ce255a6248e71128e73aa1";
|
2018-11-05 00:38:42 +01:00
|
|
|
version = "unstable-2018-07-12";
|
2016-03-28 23:14:13 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit rev;
|
2018-07-12 21:48:43 +02:00
|
|
|
owner = "erlang-nix";
|
|
|
|
repo = "hex-pm-registry-snapshots";
|
|
|
|
sha256 = "0dbpcrdh6jqmvnm1ysmy7ixyc95vnbqmikyx5kk77qwgyd43fqgi";
|
2016-03-28 23:14:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/var/hex"
|
|
|
|
zcat "registry.ets.gz" > "$out/var/hex/registry.ets"
|
|
|
|
'';
|
|
|
|
|
|
|
|
setupHook = writeText "setupHook.sh" ''
|
|
|
|
export HEX_REGISTRY_SNAPSHOT="$1/var/hex/registry.ets"
|
|
|
|
'';
|
2016-08-02 18:06:29 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
2016-03-28 23:14:13 +02:00
|
|
|
}
|