mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
24 lines
593 B
Nix
24 lines
593 B
Nix
{stdenv, writeText, fetchFromGitHub }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "hex-registry";
|
|
rev = "59b836d";
|
|
version = "0.0.0+build.${rev}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "erlang-nix";
|
|
repo = "hex-pm-registry-snapshots";
|
|
inherit rev;
|
|
sha256 = "1l8m6ckn5ivhfiv3k4dymi6b7wg511fwymnpxd6ymfd39dq0n5b0";
|
|
};
|
|
|
|
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"
|
|
'';
|
|
}
|