1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 01:20:40 +00:00
nixpkgs/pkgs/development/beam-modules/hex-registry-snapshot.nix
2018-11-06 00:17:02 +01:00

28 lines
699 B
Nix

{stdenv, writeText, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "hex-registry";
rev = "11d7a24e9f53f52490ce255a6248e71128e73aa1";
version = "unstable-2018-07-12";
src = fetchFromGitHub {
inherit rev;
owner = "erlang-nix";
repo = "hex-pm-registry-snapshots";
sha256 = "0dbpcrdh6jqmvnm1ysmy7ixyc95vnbqmikyx5kk77qwgyd43fqgi";
};
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"
'';
meta = {
platforms = stdenv.lib.platforms.unix;
};
}