1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 16:11:58 +00:00
nixpkgs/pkgs/development/beam-modules/hex-registry-snapshot.nix

29 lines
722 B
Nix
Raw Normal View History

{stdenv, writeText, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "hex-registry";
2017-09-10 22:26:00 +01:00
rev = "9f736e7";
version = "0.0.0+build.${rev}";
2017-09-10 22:26:00 +01:00
# src = /home/gleber/code/erl/hex-pm-registry-snapshots;
src = fetchFromGitHub {
owner = "erlang-nix";
repo = "hex-pm-registry-snapshots";
inherit rev;
2017-09-10 22:26:00 +01:00
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;
};
}