depot/third_party/nixpkgs/pkgs/development/tools/language-servers/nil/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

37 lines
960 B
Nix

{ lib, rustPlatform, fetchFromGitHub, nix, nix-update-script }:
rustPlatform.buildRustPackage rec {
pname = "nil";
version = "2023-05-09";
src = fetchFromGitHub {
owner = "oxalica";
repo = pname;
rev = version;
hash = "sha256-Xg3Cux5wQDatXRvQWsVD0YPfmxfijjG8+gxYqgoT6JE=";
};
cargoHash = "sha256-N7flQRIc0CXTuKjy9tVZapu+CXUT4rg66VLLT/vMUoc=";
CFG_RELEASE = version;
nativeBuildInputs = [
(lib.getBin nix)
];
# might be related to https://github.com/NixOS/nix/issues/5884
preBuild = ''
export NIX_STATE_DIR=$(mktemp -d)
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Yet another language server for Nix";
homepage = "https://github.com/oxalica/nil";
changelog = "https://github.com/oxalica/nil/releases/tag/${version}";
license = with licenses; [ mit asl20 ];
maintainers = with maintainers; [ figsoda oxalica ];
mainProgram = "nil";
};
}