mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 20:21:14 +00:00
2258b21e4b
Build-tested on x86_64 Linux and on Darwin.
28 lines
661 B
Nix
28 lines
661 B
Nix
{stdenv, writeText, fetchFromGitHub }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "hex-registry";
|
|
rev = "d58a937";
|
|
version = "0.0.0+build.${rev}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "erlang-nix";
|
|
repo = "hex-pm-registry-snapshots";
|
|
inherit rev;
|
|
sha256 = "11ymmn75qjlhzf7aaza708gq0hqg55dzd3q13npgq43wg90rgpxy";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|