starpls-bin: init at 0.1.14

This commit is contained in:
Aaron Jheng 2024-05-16 12:43:04 +08:00
parent 78ff3a2807
commit 6eb8d0976c
No known key found for this signature in database
GPG Key ID: F6A547A869D050A3

View File

@ -0,0 +1,34 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation (finalAttrs: {
pname = "starpls-bin";
version = "0.1.14";
src = {
x86_64-linux = fetchurl {
url = "https://github.com/withered-magic/starpls/releases/download/v${finalAttrs.version}/starpls-linux-amd64";
hash = "sha256-PYU+Jv3uaJqJKw6zSNOPl+NlIQgfm38cOrRqTdNXY+8=";
};
aarch64-darwin = fetchurl {
url = "https://github.com/withered-magic/starpls/releases/download/v${finalAttrs.version}/starpls-darwin-arm64";
hash = "sha256-9d1ybebguEUJu2PvMcToQEd8M4ajRrQUvBZqS6o0sbw=";
};
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
install -D $src $out/bin/starpls
'';
meta = with lib; {
homepage = "https://github.com/withered-magic/starpls";
description = "A language server for Starlark";
license = licenses.asl20;
platforms = [ "aarch64-darwin" "x86_64-linux" ];
maintainers = with maintainers; [ aaronjheng ];
mainProgram = "starpls";
};
})