8 arch = if stdenv.hostPlatform.isAarch64 then "aarch64" else "x86_64";
10 if stdenv.hostPlatform.isDarwin then
11 "macos-${arch}-apple-darwin"
13 "linux-${arch}-unknown-linux-gnu";
16 linux-aarch64-unknown-linux-gnu = "sha256-Fte7oZD5+aFph5xGrKtbSimb3aHewkjsJRXB+64IW5A=";
17 linux-x86_64-unknown-linux-gnu = "sha256-slnXUEtHJjq6wRQTt1EwqlOO/2zIGmGwa/HCi3F0YMA=";
18 macos-aarch64-apple-darwin = "sha256-3K3sPizBR/+DJIX67GsYqm2X5k7kq3kBRg8P2WALTZs=";
19 macos-x86_64-apple-darwin = "sha256-j+AVmLfe/yCvKvYhL5ikhXA1g+zQ1CDlMl1FYO6q1yA=";
22 stdenv.mkDerivation rec {
23 pname = "erlang-language-platform";
24 version = "2025-01-21";
27 url = "https://github.com/WhatsApp/erlang-language-platform/releases/download/${version}/elp-${release}-otp-26.2.tar.gz";
28 hash = hashes.${release};
31 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isElf [ autoPatchelfHook ];
33 buildInputs = lib.optionals stdenv.hostPlatform.isElf [ (lib.getLib stdenv.cc.cc) ];
39 install -m755 -D elp $out/bin/elp
44 description = "An IDE-first library for the semantic analysis of Erlang code, including LSP server, linting and refactoring tools.";
45 homepage = "https://github.com/WhatsApp/erlang-language-platform/";
46 license = with lib.licenses; [
56 maintainers = with lib.maintainers; [ offsetcyan ];
57 sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];