2016-03-28 23:14:13 +02:00
|
|
|
{stdenv, writeText, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hex-registry";
|
2016-06-15 16:15:13 +02:00
|
|
|
rev = "d58a937";
|
2016-03-28 23:14:13 +02:00
|
|
|
version = "0.0.0+build.${rev}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "erlang-nix";
|
|
|
|
repo = "hex-pm-registry-snapshots";
|
|
|
|
inherit rev;
|
2016-06-15 16:15:13 +02:00
|
|
|
sha256 = "11ymmn75qjlhzf7aaza708gq0hqg55dzd3q13npgq43wg90rgpxy";
|
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
|
|
|
}
|