2016-03-28 21:14:13 +00:00
|
|
|
{stdenv, writeText, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hex-registry";
|
2016-11-30 10:02:46 +00:00
|
|
|
rev = "e5e494a";
|
2016-03-28 21:14:13 +00:00
|
|
|
version = "0.0.0+build.${rev}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "erlang-nix";
|
|
|
|
repo = "hex-pm-registry-snapshots";
|
|
|
|
inherit rev;
|
2016-11-30 10:02:46 +00:00
|
|
|
sha256 = "0877dragfxs22a05d8mv42z5535kfx9rs4y7fwwbd1ybphczf8za";
|
2016-03-28 21:14:13 +00: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 16:06:29 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
2016-03-28 21:14:13 +00:00
|
|
|
}
|