push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{
"elp-linux-aarch64-unknown-linux-gnu-otp-26.2": "sha256-xKl19cLz3Pm39QS8+9fOCGJHpxl4NoPYHIwTqKDq4Jc=",
"elp-linux-aarch64-unknown-linux-gnu-otp-27.3": "sha256-GNoV6Ihtro3ecl4cncyQKQez/5CBqj1E3JV1JK8l2V8=",
"elp-linux-aarch64-unknown-linux-gnu-otp-28": "sha256-DW00mSXJWIBfwsV9juMKaiFwNkezT1Ro+5zMaCwFRzE=",
"elp-linux-x86_64-unknown-linux-gnu-otp-26.2": "sha256-fQvlzwS7crDsqmSjsUlFXbqKnCKldOYuiQDmGojqJb8=",
"elp-linux-x86_64-unknown-linux-gnu-otp-27.3": "sha256-4pZtSVCDIiJ7k83go7WjJq4wxWbc9nG4hJoAgXDMOZM=",
"elp-linux-x86_64-unknown-linux-gnu-otp-28": "sha256-3hY+5TDBobRjKgfptvgHmdtuWm8UE7KoWFhsR2qmQhc=",
"elp-macos-aarch64-apple-darwin-otp-26.2": "sha256-38N+0msiPMv9eFTSzWdEqmczDp49JvTlu3kDedmC+Lw=",
"elp-macos-aarch64-apple-darwin-otp-27.3": "sha256-2uZyvyVwQULz+3HtvkIGvjO5Dm7qAAIbHE/VUcqcXkQ=",
"elp-macos-aarch64-apple-darwin-otp-28": "sha256-BosctdlXWTxkVyLX8awlJtyHAtfoVxFlvs7qrSlPTZc=",
"elp-macos-x86_64-apple-darwin-otp-26.2": "sha256-p0xotdrflT2CANJi4OaevJZT4nhFRAfdzrhQ/7M8ykA=",
"elp-macos-x86_64-apple-darwin-otp-27.3": "sha256-qTvsGRCVqqoSWK/t7MysE1wlD0PwtUQQ1N1Zols+Egk=",
"elp-macos-x86_64-apple-darwin-otp-28": "sha256-DSB8AXWM1KByuzg5HY2lh2x4zmeeR2nyiERR3Iovpns="
}

View File

@@ -0,0 +1,73 @@
{
stdenv,
lib,
fetchurl,
autoPatchelfHook,
erlang,
}:
let
# erlang-language-platform supports multiple OTP versions.
# here we search the release names from hashes.json to check support for our OTP.
# ELP releases only list the major and minor version so we do a prefix check.
arch = if stdenv.hostPlatform.isAarch64 then "aarch64" else "x86_64";
platform =
if stdenv.hostPlatform.isDarwin then
"elp-macos-${arch}-apple-darwin"
else
"elp-linux-${arch}-unknown-linux-gnu";
otp_version = "otp-${lib.versions.major erlang.version}";
release_major = "${platform}-${otp_version}";
hashes = builtins.fromJSON (builtins.readFile ./hashes.json);
release_name =
let
hash_names = builtins.attrNames hashes;
found_name = lib.lists.findFirst (name: lib.strings.hasPrefix release_major name) false hash_names;
in
if found_name != false then
found_name
else
throw "erlang-language-platform does not support OTP major/minor version ${otp_version}";
in
stdenv.mkDerivation rec {
pname = "erlang-language-platform";
version = "2025-07-21";
src = fetchurl {
url = "https://github.com/WhatsApp/erlang-language-platform/releases/download/${version}/${release_name}.tar.gz";
hash = hashes.${release_name};
};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isElf [ autoPatchelfHook ];
buildInputs = lib.optionals stdenv.hostPlatform.isElf [ (lib.getLib stdenv.cc.cc) ];
sourceRoot = ".";
installPhase = ''
runHook preInstall
install -m755 -D elp $out/bin/elp
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
description = "IDE-first library for the semantic analysis of Erlang code, including LSP server, linting and refactoring tools";
homepage = "https://github.com/WhatsApp/erlang-language-platform/";
license = with lib.licenses; [
mit
asl20
];
platforms = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
maintainers = with lib.maintainers; [ offsetcyan ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
}

View File

@@ -0,0 +1,24 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl jq common-updater-scripts
# shellcheck shell=bash
set -euo pipefail
curl_github() {
curl -L ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@"
}
release_json=$(curl_github https://api.github.com/repos/WhatsApp/erlang-language-platform/releases/latest)
version=$(echo "$release_json" | jq -r '.tag_name')
releases=$(echo "$release_json" | jq -r '.assets[] | select(.browser_download_url | test(".tar.gz$")) | .name + ":" + .browser_download_url')
update-source-version erlang-language-platform "$version" --file=./pkgs/by-name/er/erlang-language-platform/package.nix
for release in $releases; do
IFS=: read -r name url <<< "$release"
hash_name=$(echo "$name" | sed 's/.tar.gz$//')
hash_prefetched=$(nix-prefetch-url --type sha256 "$url")
hash_sri=$(nix hash to-sri --type sha256 "$hash_prefetched")
echo "$hash_name" "$hash_sri"
done |
jq -sR 'rtrimstr("\n") | split("\n") | map(split(" ") | {(.[0]): .[1]}) | add' > hashes.json