2022-09-30 11:47:45 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, nix, nix-update-script }:
|
2022-09-11 15:47:08 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "nil";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "2023-04-03";
|
2022-09-11 15:47:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oxalica";
|
|
|
|
repo = pname;
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = version;
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-d/TusDXmIo8IT5DNRA21lN+nOVSER8atIx9TJteR6LQ=";
|
2022-09-11 15:47:08 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
cargoHash = "sha256-DIar3idK+wajMU2sw1pX9j9IxfO+QnGogSFndDNu8R8=";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
CFG_RELEASE = version;
|
2022-09-11 15:47:08 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
(lib.getBin nix)
|
|
|
|
];
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
# might be related to https://github.com/NixOS/nix/issues/5884
|
|
|
|
preBuild = ''
|
|
|
|
export NIX_STATE_DIR=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2022-09-11 15:47:08 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-09-30 11:47:45 +00:00
|
|
|
description = "Yet another language server for Nix";
|
2022-09-11 15:47:08 +00:00
|
|
|
homepage = "https://github.com/oxalica/nil";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/oxalica/nil/releases/tag/${version}";
|
2022-09-11 15:47:08 +00:00
|
|
|
license = with licenses; [ mit asl20 ];
|
|
|
|
maintainers = with maintainers; [ figsoda oxalica ];
|
|
|
|
};
|
|
|
|
}
|