erlang-ls: add checkPhase

This commit is contained in:
David 2021-05-31 19:25:05 +02:00 committed by Raphael Megzari
parent c34a62ebef
commit e5d8f1adc9
2 changed files with 198 additions and 140 deletions

View File

@ -1,4 +1,4 @@
{ fetchFromGitHub, fetchHex, rebar3Relx, buildRebar3, lib }:
{ fetchFromGitHub, fetchHex, rebar3Relx, buildRebar3, rebar3-proper, lib }:
let
version = "0.16.0";
owner = "erlang-ls";
@ -6,6 +6,11 @@ let
deps = import ./rebar-deps.nix {
inherit fetchHex fetchFromGitHub;
builder = buildRebar3;
overrides = (self: super: {
proper = super.proper.overrideAttrs (_: {
configurePhase = "true";
});
});
};
in rebar3Relx {
name = "erlang-ls";
@ -17,7 +22,16 @@ in rebar3Relx {
};
releaseType = "escript";
beamDeps = builtins.attrValues deps;
buildPlugins = [ rebar3-proper ];
buildPhase = "HOME=. make";
# based on https://github.com/erlang-ls/erlang_ls/blob/main/.github/workflows/build.yml
# these tests are excessively long and we should probably skip them
checkPhase = ''
HOME=. epmd -daemon
HOME=. rebar3 ct
HOME=. rebar3 proper --constraint_tries 100
'';
doCheck = true;
installPhase = ''
mkdir -p $out/bin
cp _build/default/bin/erlang_ls $out/bin/

View File

@ -1,175 +1,219 @@
# Generated by rebar3_nix
let fetchOnly = { src, ... }: src;
in { builder ? fetchOnly, fetchHex, fetchFromGitHub }: rec {
getopt = builder {
name = "getopt";
version = "1.0.1";
src = fetchHex {
pkg = "getopt";
in { builder ? fetchOnly, fetchHex, fetchFromGitHub, overrides ? (x: y: { }) }:
let
self = packages // (overrides self packages);
packages = with self; {
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 = [ ];
};
beamDeps = [ ];
};
zipper = builder {
name = "zipper";
version = "1.0.1";
src = 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 = [ ];
};
beamDeps = [ ];
};
quickrand = builder {
name = "quickrand";
version = "2.0.1";
src = 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 = [ ];
};
beamDeps = [ ];
};
providers = builder {
name = "providers";
version = "1.8.1";
src = 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 ];
};
beamDeps = [ getopt ];
};
katana_code = builder {
name = "katana_code";
version = "0.2.1";
src = 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 = [ ];
};
beamDeps = [ ];
};
bucs = builder {
name = "bucs";
version = "1.0.16";
src = 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 = [ ];
};
beamDeps = [ ];
};
yamerl = builder {
name = "yamerl";
version = "0.8.1";
src = 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 = [ ];
};
beamDeps = [ ];
};
uuid = builder {
name = "uuid";
version = "2.0.1";
src = 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 ];
};
beamDeps = [ quickrand ];
};
tdiff = builder {
name = "tdiff";
version = "0.1.2";
src = 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 = [ ];
};
beamDeps = [ ];
};
redbug = builder {
name = "redbug";
version = "2.0.6";
src = 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 = [ ];
};
beamDeps = [ ];
};
rebar3_format = builder {
name = "rebar3_format";
version = "0.8.2";
src = 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 ];
};
beamDeps = [ katana_code ];
};
ranch = builder {
name = "ranch";
version = "2.0.0";
src = fetchHex {
pkg = "ranch";
ranch = builder {
name = "ranch";
version = "2.0.0";
sha256 = "sha256-wgpIQMfWYjwZgS06fIKLLxvRU+8PEky2nFT+UdikKuA=";
src = fetchHex {
pkg = "ranch";
version = "2.0.0";
sha256 = "sha256-wgpIQMfWYjwZgS06fIKLLxvRU+8PEky2nFT+UdikKuA=";
};
beamDeps = [ ];
};
beamDeps = [ ];
};
jsx = builder {
name = "jsx";
version = "3.0.0";
src = 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 = [ ];
};
beamDeps = [ ];
};
erlfmt = builder {
name = "erlfmt";
version = "git";
src = fetchFromGitHub {
owner = "whatsapp";
repo = "erlfmt";
rev = "2e93fc4a646111357642b0179a2a63151868d890";
sha256 = "0n7kygycn05aqdp5dyj192mja89l4nxv2wg16qg2c0bmw9s7j2mr";
erlfmt = builder {
name = "erlfmt";
version = "git";
src = fetchFromGitHub {
owner = "whatsapp";
repo = "erlfmt";
rev = "2e93fc4a646111357642b0179a2a63151868d890";
sha256 = "0n7kygycn05aqdp5dyj192mja89l4nxv2wg16qg2c0bmw9s7j2mr";
};
beamDeps = [ ];
};
beamDeps = [ ];
};
ephemeral = builder {
name = "ephemeral";
version = "2.0.4";
src = 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 ];
};
beamDeps = [ bucs ];
};
elvis_core = builder {
name = "elvis_core";
version = "1.1.1";
src = 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 ];
};
beamDeps = [ katana_code zipper ];
};
docsh = builder {
name = "docsh";
version = "0.7.2";
src = 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 ];
};
proper_contrib = builder {
name = "proper_contrib";
version = "0.2.0";
src = fetchHex {
pkg = "proper_contrib";
version = "0.2.0";
sha256 = "sha256-jFRRL1zr9JKaG1eqMDfcKk2xe93uOrXUenB14icVCBU=";
};
beamDeps = [ proper ];
};
proper = builder {
name = "proper";
version = "1.3.0";
src = fetchHex {
pkg = "proper";
version = "1.3.0";
sha256 = "sha256-SqGS/M3dA/2+UP72IL6dTS+SY1tU9V+4OuwYWZRAPLw=";
};
beamDeps = [ ];
};
meck = builder {
name = "meck";
version = "0.9.0";
src = fetchHex {
pkg = "meck";
version = "0.9.0";
sha256 = "sha256-+BPpDdC4myUWoCAaNV6EsavHi1dRqgy/ZpqdhagQrGM=";
};
beamDeps = [ ];
};
coveralls = builder {
name = "coveralls";
version = "2.2.0";
src = fetchHex {
pkg = "coveralls";
version = "2.2.0";
sha256 = "sha256-zVTbCqjGS1OSgBicVhns7hOkaiiw8ct3RUTdzBZiBKM=";
};
beamDeps = [ jsx ];
};
beamDeps = [ providers ];
};
}
in self