mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
erlang-ls: add checkPhase
This commit is contained in:
parent
c34a62ebef
commit
e5d8f1adc9
@ -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/
|
||||
|
@ -1,6 +1,9 @@
|
||||
# Generated by rebar3_nix
|
||||
let fetchOnly = { src, ... }: src;
|
||||
in { builder ? fetchOnly, fetchHex, fetchFromGitHub }: rec {
|
||||
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";
|
||||
@ -172,4 +175,45 @@ in { builder ? fetchOnly, fetchHex, fetchFromGitHub }: rec {
|
||||
};
|
||||
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 ];
|
||||
};
|
||||
};
|
||||
in self
|
||||
|
Loading…
Reference in New Issue
Block a user