mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 16:11:58 +00:00
29 lines
722 B
Nix
29 lines
722 B
Nix
{stdenv, writeText, fetchFromGitHub }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "hex-registry";
|
|
rev = "9f736e7";
|
|
version = "0.0.0+build.${rev}";
|
|
|
|
# src = /home/gleber/code/erl/hex-pm-registry-snapshots;
|
|
src = fetchFromGitHub {
|
|
owner = "erlang-nix";
|
|
repo = "hex-pm-registry-snapshots";
|
|
inherit rev;
|
|
sha256 = "1xiw5yifyk3bbmr0cr82y1nc4c6zk11f6azdv07glb7yrgccrv79";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|