Files
nixpkgs/pkgs/by-name/am/ameba-ls/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

61 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
crystal_1_15,
versionCheckHook,
}:
let
# Use the same Crystal minor version as specified in upstream
crystal = crystal_1_15;
in
crystal.buildCrystalPackage rec {
pname = "ameba-ls";
version = "0.1.0";
src = fetchFromGitHub {
owner = "crystal-lang-tools";
repo = "ameba-ls";
tag = "v${version}";
hash = "sha256-TEHjR+34wrq24XJNLhWZCEzcDEMDlmUHv0iiF4Z6JlI=";
};
shardsFile = ./shards.nix;
crystalBinaries.ameba-ls.src = "src/ameba-ls.cr";
buildTargets = [
"ameba-ls"
];
# There are no actual tests
doCheck = false;
installPhase = ''
runHook preInstall
install -Dm555 bin/ameba-ls -t "$out/bin/"
runHook postInstall
'';
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/ameba-ls";
versionCheckProgramArg = "--version";
meta = {
description = "Crystal language server powered by Ameba linter";
homepage = "https://github.com/crystal-lang-tools/ameba-ls";
changelog = "https://github.com/crystal-lang-tools/ameba-ls/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
kachick
];
mainProgram = "ameba-ls";
};
}