erlang-ls: use rebar3Relx

This commit is contained in:
David 2021-05-17 17:53:54 +02:00 committed by Raphael Megzari
parent 72795f8c0b
commit 049ecc9716
2 changed files with 140 additions and 68 deletions

View file

@ -1,25 +1,23 @@
{ fetchFromGitHub, fetchHex, stdenv, erlang, rebar3WithPlugins, lib }:
{ fetchFromGitHub, fetchHex, rebar3Relx, buildRebar3, lib }:
let
version = "0.15.0";
owner = "erlang-ls";
repo = "erlang_ls";
deps = import ./rebar-deps.nix { inherit fetchHex fetchFromGitHub; };
in stdenv.mkDerivation {
deps = import ./rebar-deps.nix {
inherit fetchHex fetchFromGitHub;
builder = buildRebar3;
};
in rebar3Relx {
name = "erlang-ls";
inherit version;
pname = "erlang-ls";
buildInputs = [ erlang (rebar3WithPlugins { }) ];
src = fetchFromGitHub {
inherit owner repo;
sha256 = "1s6zk8r5plm7ajifz17mvfrnk5mzbhj7alayink9phqbmzrypnfg";
rev = version;
};
buildPhase = ''
mkdir _checkouts
${toString (lib.mapAttrsToList (k: v: ''
cp -R ${v} _checkouts/${k}
'') deps)}
make
'';
releaseType = "escript";
beamDeps = builtins.attrValues deps;
buildPhase = "HOME=. make";
installPhase = ''
mkdir -p $out/bin
cp _build/default/bin/erlang_ls $out/bin/

View file

@ -1,90 +1,164 @@
# Generated by rebar3_nix
{ fetchHex, fetchFromGitHub }:
{
getopt = fetchHex {
pkg = "getopt";
let fetchOnly = { src, ... }: src;
in { builder ? fetchOnly, fetchHex, fetchFromGitHub }: rec {
getopt = builder {
name = "getopt";
version = "1.0.1";
sha256 = "sha256-U+Grg7nOtlyWctPno1uAkum9ybPugHIUcaFhwQxZlZw=";
src = fetchHex {
pkg = "getopt";
version = "1.0.1";
sha256 = "sha256-U+Grg7nOtlyWctPno1uAkum9ybPugHIUcaFhwQxZlZw=";
};
beamDeps = [ ];
};
zipper = fetchHex {
pkg = "zipper";
zipper = builder {
name = "zipper";
version = "1.0.1";
sha256 = "sha256-ah/T4fDMHR31ZCyaDOIXgDZBGwpclkKFHR2idr1zfC0=";
src = fetchHex {
pkg = "zipper";
version = "1.0.1";
sha256 = "sha256-ah/T4fDMHR31ZCyaDOIXgDZBGwpclkKFHR2idr1zfC0=";
};
beamDeps = [ ];
};
quickrand = fetchHex {
pkg = "quickrand";
quickrand = builder {
name = "quickrand";
version = "2.0.1";
sha256 = "sha256-FNtn1K72uIFYEOyfPM714yS3O1bK42h/mddSuFvdTJY=";
src = fetchHex {
pkg = "quickrand";
version = "2.0.1";
sha256 = "sha256-FNtn1K72uIFYEOyfPM714yS3O1bK42h/mddSuFvdTJY=";
};
beamDeps = [ ];
};
providers = fetchHex {
pkg = "providers";
providers = builder {
name = "providers";
version = "1.8.1";
sha256 = "sha256-5FdFrenEdqmkaeoIQOQYqxk2DcRPAaIzME4RikRIa6A=";
src = fetchHex {
pkg = "providers";
version = "1.8.1";
sha256 = "sha256-5FdFrenEdqmkaeoIQOQYqxk2DcRPAaIzME4RikRIa6A=";
};
beamDeps = [ getopt ];
};
katana_code = fetchHex {
pkg = "katana_code";
katana_code = builder {
name = "katana_code";
version = "0.2.1";
sha256 = "sha256-hEitP1bZgU+YoovmUPcZG91QZXXjRcwW1YZmCxD26ZI=";
src = fetchHex {
pkg = "katana_code";
version = "0.2.1";
sha256 = "sha256-hEitP1bZgU+YoovmUPcZG91QZXXjRcwW1YZmCxD26ZI=";
};
beamDeps = [ ];
};
bucs = fetchHex {
pkg = "bucs";
bucs = builder {
name = "bucs";
version = "1.0.16";
sha256 = "sha256-/2pccqUArXrsHuO6FkrjxFDq3uiYsNFR4frKGKyNDWI=";
src = fetchHex {
pkg = "bucs";
version = "1.0.16";
sha256 = "sha256-/2pccqUArXrsHuO6FkrjxFDq3uiYsNFR4frKGKyNDWI=";
};
beamDeps = [ ];
};
yamerl = fetchHex {
pkg = "yamerl";
yamerl = builder {
name = "yamerl";
version = "0.8.1";
sha256 = "sha256-lssw+dZDRP7Q74qS6fFvIH3mwE3/9PNmdSynn1vOsj8=";
src = fetchHex {
pkg = "yamerl";
version = "0.8.1";
sha256 = "sha256-lssw+dZDRP7Q74qS6fFvIH3mwE3/9PNmdSynn1vOsj8=";
};
beamDeps = [ ];
};
uuid = fetchHex {
pkg = "uuid_erl";
uuid = builder {
name = "uuid";
version = "2.0.1";
sha256 = "sha256-q1fKzNUfFwAR5fREzoZfhLQWBeSDqe/MRowa+uyHVTs=";
src = fetchHex {
pkg = "uuid_erl";
version = "2.0.1";
sha256 = "sha256-q1fKzNUfFwAR5fREzoZfhLQWBeSDqe/MRowa+uyHVTs=";
};
beamDeps = [ quickrand ];
};
tdiff = fetchHex {
pkg = "tdiff";
tdiff = builder {
name = "tdiff";
version = "0.1.2";
sha256 = "sha256-4MLhaPmSUqWIl2jVyPHmUQoYRZLUz6BrIneKGNM9eHU=";
src = fetchHex {
pkg = "tdiff";
version = "0.1.2";
sha256 = "sha256-4MLhaPmSUqWIl2jVyPHmUQoYRZLUz6BrIneKGNM9eHU=";
};
beamDeps = [ ];
};
redbug = fetchHex {
pkg = "redbug";
redbug = builder {
name = "redbug";
version = "2.0.6";
sha256 = "sha256-qtlJhnH0q5HqylCZ/oWmFhgVimNuYoaJLE989K8XHQQ=";
src = fetchHex {
pkg = "redbug";
version = "2.0.6";
sha256 = "sha256-qtlJhnH0q5HqylCZ/oWmFhgVimNuYoaJLE989K8XHQQ=";
};
beamDeps = [ ];
};
rebar3_format = fetchHex {
pkg = "rebar3_format";
rebar3_format = builder {
name = "rebar3_format";
version = "0.8.2";
sha256 = "sha256-yo/ydjjCFpWT0USdrL6IlWNBk+0zNOkGtU/JfwgfUhM=";
src = fetchHex {
pkg = "rebar3_format";
version = "0.8.2";
sha256 = "sha256-yo/ydjjCFpWT0USdrL6IlWNBk+0zNOkGtU/JfwgfUhM=";
};
beamDeps = [ katana_code ];
};
ranch = fetchHex {
pkg = "ranch";
ranch = builder {
name = "ranch";
version = "1.7.1";
sha256 = "sha256-RR2FJ3h99xbZncNhYvygWTSRXbC2FBu9rC6o08evx9c=";
src = fetchHex {
pkg = "ranch";
version = "1.7.1";
sha256 = "sha256-RR2FJ3h99xbZncNhYvygWTSRXbC2FBu9rC6o08evx9c=";
};
beamDeps = [ ];
};
jsx = fetchHex {
pkg = "jsx";
jsx = builder {
name = "jsx";
version = "3.0.0";
sha256 = "sha256-N77KBDX1yoovRfdqRiEedkGPvvgMNvA2HCSfx1BZ3G0=";
src = fetchHex {
pkg = "jsx";
version = "3.0.0";
sha256 = "sha256-N77KBDX1yoovRfdqRiEedkGPvvgMNvA2HCSfx1BZ3G0=";
};
beamDeps = [ ];
};
erlfmt = fetchFromGitHub {
owner = "whatsapp";
repo = "erlfmt";
rev = "2e93fc4a646111357642b0179a2a63151868d890";
sha256 = "0n7kygycn05aqdp5dyj192mja89l4nxv2wg16qg2c0bmw9s7j2mr";
};
ephemeral = fetchHex {
pkg = "ephemeral";
ephemeral = builder {
name = "ephemeral";
version = "2.0.4";
sha256 = "sha256-Syk9gPdfnEV1/0ucjoiaVoAvQLAYv1fnTxlkTv7myFA=";
src = fetchHex {
pkg = "ephemeral";
version = "2.0.4";
sha256 = "sha256-Syk9gPdfnEV1/0ucjoiaVoAvQLAYv1fnTxlkTv7myFA=";
};
beamDeps = [ bucs ];
};
elvis_core = fetchHex {
pkg = "elvis_core";
elvis_core = builder {
name = "elvis_core";
version = "1.1.1";
sha256 = "sha256-ORyVuqSfJxjX+0mLzwgEbd/CAs8Kq2Oy5DknFIXJ3EI=";
src = fetchHex {
pkg = "elvis_core";
version = "1.1.1";
sha256 = "sha256-ORyVuqSfJxjX+0mLzwgEbd/CAs8Kq2Oy5DknFIXJ3EI=";
};
beamDeps = [ katana_code zipper ];
};
docsh = fetchHex {
pkg = "docsh";
docsh = builder {
name = "docsh";
version = "0.7.2";
sha256 = "sha256-Tn20YbsHVA0rw9NmuFE/AZdxLQSVu4V0TzZ9OBUHYTQ=";
src = fetchHex {
pkg = "docsh";
version = "0.7.2";
sha256 = "sha256-Tn20YbsHVA0rw9NmuFE/AZdxLQSVu4V0TzZ9OBUHYTQ=";
};
beamDeps = [ providers ];
};
}