2016-03-28 22:14:13 +01:00
|
|
|
{stdenv, writeText, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hex-registry";
|
2017-09-10 22:26:00 +01:00
|
|
|
rev = "9f736e7";
|
2016-03-28 22:14:13 +01:00
|
|
|
version = "0.0.0+build.${rev}";
|
|
|
|
|
2017-09-10 22:26:00 +01:00
|
|
|
# src = /home/gleber/code/erl/hex-pm-registry-snapshots;
|
2016-03-28 22:14:13 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "erlang-nix";
|
|
|
|
repo = "hex-pm-registry-snapshots";
|
|
|
|
inherit rev;
|
2017-09-10 22:26:00 +01:00
|
|
|
sha256 = "1xiw5yifyk3bbmr0cr82y1nc4c6zk11f6azdv07glb7yrgccrv79";
|
2016-03-28 22:14:13 +01: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 17:06:29 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
2016-03-28 22:14:13 +01:00
|
|
|
}
|