diff options
Diffstat (limited to 'pkgs/development/beam-modules')
-rw-r--r-- | pkgs/development/beam-modules/erlang-ls/default.nix | 22 | ||||
-rw-r--r-- | pkgs/development/beam-modules/erlang-ls/rebar-deps.nix | 216 |
2 files changed, 155 insertions, 83 deletions
diff --git a/pkgs/development/beam-modules/erlang-ls/default.nix b/pkgs/development/beam-modules/erlang-ls/default.nix index ff68af8d5217e..45ca3704be03b 100644 --- a/pkgs/development/beam-modules/erlang-ls/default.nix +++ b/pkgs/development/beam-modules/erlang-ls/default.nix @@ -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/ diff --git a/pkgs/development/beam-modules/erlang-ls/rebar-deps.nix b/pkgs/development/beam-modules/erlang-ls/rebar-deps.nix index 9de79e52be6fd..6fe8b1ac5712c 100644 --- a/pkgs/development/beam-modules/erlang-ls/rebar-deps.nix +++ b/pkgs/development/beam-modules/erlang-ls/rebar-deps.nix @@ -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="; - }; - zipper = fetchHex { - pkg = "zipper"; + src = fetchHex { + pkg = "getopt"; + version = "1.0.1"; + sha256 = "sha256-U+Grg7nOtlyWctPno1uAkum9ybPugHIUcaFhwQxZlZw="; + }; + beamDeps = [ ]; + }; + zipper = builder { + name = "zipper"; version = "1.0.1"; - sha256 = "sha256-ah/T4fDMHR31ZCyaDOIXgDZBGwpclkKFHR2idr1zfC0="; - }; - quickrand = fetchHex { - pkg = "quickrand"; + src = fetchHex { + pkg = "zipper"; + version = "1.0.1"; + sha256 = "sha256-ah/T4fDMHR31ZCyaDOIXgDZBGwpclkKFHR2idr1zfC0="; + }; + beamDeps = [ ]; + }; + quickrand = builder { + name = "quickrand"; version = "2.0.1"; - sha256 = "sha256-FNtn1K72uIFYEOyfPM714yS3O1bK42h/mddSuFvdTJY="; - }; - providers = fetchHex { - pkg = "providers"; + src = fetchHex { + pkg = "quickrand"; + version = "2.0.1"; + sha256 = "sha256-FNtn1K72uIFYEOyfPM714yS3O1bK42h/mddSuFvdTJY="; + }; + beamDeps = [ ]; + }; + providers = builder { + name = "providers"; version = "1.8.1"; - sha256 = "sha256-5FdFrenEdqmkaeoIQOQYqxk2DcRPAaIzME4RikRIa6A="; - }; - katana_code = fetchHex { - pkg = "katana_code"; + src = fetchHex { + pkg = "providers"; + version = "1.8.1"; + sha256 = "sha256-5FdFrenEdqmkaeoIQOQYqxk2DcRPAaIzME4RikRIa6A="; + }; + beamDeps = [ getopt ]; + }; + katana_code = builder { + name = "katana_code"; version = "0.2.1"; - sha256 = "sha256-hEitP1bZgU+YoovmUPcZG91QZXXjRcwW1YZmCxD26ZI="; - }; - bucs = fetchHex { - pkg = "bucs"; + src = fetchHex { + pkg = "katana_code"; + version = "0.2.1"; + sha256 = "sha256-hEitP1bZgU+YoovmUPcZG91QZXXjRcwW1YZmCxD26ZI="; + }; + beamDeps = [ ]; + }; + bucs = builder { + name = "bucs"; version = "1.0.16"; - sha256 = "sha256-/2pccqUArXrsHuO6FkrjxFDq3uiYsNFR4frKGKyNDWI="; - }; - yamerl = fetchHex { - pkg = "yamerl"; + src = fetchHex { + pkg = "bucs"; + version = "1.0.16"; + sha256 = "sha256-/2pccqUArXrsHuO6FkrjxFDq3uiYsNFR4frKGKyNDWI="; + }; + beamDeps = [ ]; + }; + yamerl = builder { + name = "yamerl"; version = "0.8.1"; - sha256 = "sha256-lssw+dZDRP7Q74qS6fFvIH3mwE3/9PNmdSynn1vOsj8="; - }; - uuid = fetchHex { - pkg = "uuid_erl"; + src = fetchHex { + pkg = "yamerl"; + version = "0.8.1"; + sha256 = "sha256-lssw+dZDRP7Q74qS6fFvIH3mwE3/9PNmdSynn1vOsj8="; + }; + beamDeps = [ ]; + }; + uuid = builder { + name = "uuid"; version = "2.0.1"; - sha256 = "sha256-q1fKzNUfFwAR5fREzoZfhLQWBeSDqe/MRowa+uyHVTs="; - }; - tdiff = fetchHex { - pkg = "tdiff"; + src = fetchHex { + pkg = "uuid_erl"; + version = "2.0.1"; + sha256 = "sha256-q1fKzNUfFwAR5fREzoZfhLQWBeSDqe/MRowa+uyHVTs="; + }; + beamDeps = [ quickrand ]; + }; + tdiff = builder { + name = "tdiff"; version = "0.1.2"; - sha256 = "sha256-4MLhaPmSUqWIl2jVyPHmUQoYRZLUz6BrIneKGNM9eHU="; - }; - redbug = fetchHex { - pkg = "redbug"; + src = fetchHex { + pkg = "tdiff"; + version = "0.1.2"; + sha256 = "sha256-4MLhaPmSUqWIl2jVyPHmUQoYRZLUz6BrIneKGNM9eHU="; + }; + beamDeps = [ ]; + }; + redbug = builder { + name = "redbug"; version = "2.0.6"; - sha256 = "sha256-qtlJhnH0q5HqylCZ/oWmFhgVimNuYoaJLE989K8XHQQ="; - }; - rebar3_format = fetchHex { - pkg = "rebar3_format"; + src = fetchHex { + pkg = "redbug"; + version = "2.0.6"; + sha256 = "sha256-qtlJhnH0q5HqylCZ/oWmFhgVimNuYoaJLE989K8XHQQ="; + }; + beamDeps = [ ]; + }; + rebar3_format = builder { + name = "rebar3_format"; version = "0.8.2"; - sha256 = "sha256-yo/ydjjCFpWT0USdrL6IlWNBk+0zNOkGtU/JfwgfUhM="; - }; - ranch = fetchHex { - pkg = "ranch"; + src = fetchHex { + pkg = "rebar3_format"; + version = "0.8.2"; + sha256 = "sha256-yo/ydjjCFpWT0USdrL6IlWNBk+0zNOkGtU/JfwgfUhM="; + }; + beamDeps = [ katana_code ]; + }; + ranch = builder { + name = "ranch"; version = "1.7.1"; - sha256 = "sha256-RR2FJ3h99xbZncNhYvygWTSRXbC2FBu9rC6o08evx9c="; - }; - jsx = fetchHex { - pkg = "jsx"; + src = fetchHex { + pkg = "ranch"; + version = "1.7.1"; + sha256 = "sha256-RR2FJ3h99xbZncNhYvygWTSRXbC2FBu9rC6o08evx9c="; + }; + beamDeps = [ ]; + }; + jsx = builder { + name = "jsx"; version = "3.0.0"; - sha256 = "sha256-N77KBDX1yoovRfdqRiEedkGPvvgMNvA2HCSfx1BZ3G0="; - }; - erlfmt = fetchFromGitHub { - owner = "whatsapp"; - repo = "erlfmt"; - rev = "2e93fc4a646111357642b0179a2a63151868d890"; - sha256 = "0n7kygycn05aqdp5dyj192mja89l4nxv2wg16qg2c0bmw9s7j2mr"; - }; - ephemeral = fetchHex { - pkg = "ephemeral"; + src = fetchHex { + pkg = "jsx"; + version = "3.0.0"; + sha256 = "sha256-N77KBDX1yoovRfdqRiEedkGPvvgMNvA2HCSfx1BZ3G0="; + }; + beamDeps = [ ]; + }; + ephemeral = builder { + name = "ephemeral"; version = "2.0.4"; - sha256 = "sha256-Syk9gPdfnEV1/0ucjoiaVoAvQLAYv1fnTxlkTv7myFA="; - }; - elvis_core = fetchHex { - pkg = "elvis_core"; + src = fetchHex { + pkg = "ephemeral"; + version = "2.0.4"; + sha256 = "sha256-Syk9gPdfnEV1/0ucjoiaVoAvQLAYv1fnTxlkTv7myFA="; + }; + beamDeps = [ bucs ]; + }; + elvis_core = builder { + name = "elvis_core"; version = "1.1.1"; - sha256 = "sha256-ORyVuqSfJxjX+0mLzwgEbd/CAs8Kq2Oy5DknFIXJ3EI="; - }; - docsh = fetchHex { - pkg = "docsh"; + src = fetchHex { + pkg = "elvis_core"; + version = "1.1.1"; + sha256 = "sha256-ORyVuqSfJxjX+0mLzwgEbd/CAs8Kq2Oy5DknFIXJ3EI="; + }; + beamDeps = [ katana_code zipper ]; + }; + 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 ]; }; } |