nixpkgs/pkgs/development/beam-modules/hex/default.nix
Silvan Mosberger f5fa5fa4d6 pkgs: refactor needless quoting of homepage meta attribute (#27809)
* pkgs: refactor needless quoting of homepage meta attribute

A lot of packages are needlessly quoting the homepage meta attribute
(about 1400, 22%), this commit refactors all of those instances.

* pkgs: Fixing some links that were wrongfully unquoted in the previous
commit

* Fixed some instances
2017-08-01 22:03:30 +02:00

59 lines
1.2 KiB
Nix

{stdenv, fetchFromGitHub, writeText, elixir }:
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
buildInputs = [ drv ];
};
pkg = self: stdenv.mkDerivation rec {
name = "hex";
version = "v0.14.0";
src = fetchFromGitHub {
owner = "hexpm";
repo = "hex";
rev = "${version}";
sha256 = "042rcwznb6cf9khn4l969axf7vhk53gy3rp23y6c8fhfp1472pai";
};
setupHook = writeText "setupHook.sh" ''
addToSearchPath ERL_LIBS "$1/lib/erlang/lib/"
'';
dontStrip = true;
buildInputs = [ elixir ];
buildPhase = ''
runHook preBuild
export HEX_OFFLINE=1
export HEX_HOME=./
export MIX_ENV=prod
mix compile
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib/erlang/lib
cp -r ./_build/prod/lib/hex $out/lib/erlang/lib/
runHook postInstall
'';
meta = {
description = "Package manager for the Erlang VM https://hex.pm";
license = stdenv.lib.licenses.mit;
homepage = https://github.com/hexpm/hex;
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
};
passthru = {
env = shell self;
};
};
in stdenv.lib.fix pkg