depot/third_party/nixpkgs/pkgs/by-name/as/asm-lsp/package.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

52 lines
1.1 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
darwin,
libiconv,
}:
let
pname = "asm-lsp";
version = "0.9.0";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "bergercookie";
repo = "asm-lsp";
rev = "v${version}";
hash = "sha256-0GB3tXZuCu3syh+RG+eXoliZVHMPOhYC3RchSSx4u5w=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.buildPlatform.isDarwin [
darwin.apple_sdk.frameworks.SystemConfiguration
libiconv
];
cargoHash = "sha256-AtCnYOOtViMpg+rz8miuBZg1pENBPaf9kamSPaVUyiw=";
# tests expect ~/.cache/asm-lsp to be writable
preCheck = ''
export HOME=$(mktemp -d)
'';
meta = {
description = "Language server for NASM/GAS/GO Assembly";
homepage = "https://github.com/bergercookie/asm-lsp";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [
NotAShelf
CaiqueFigueiredo
];
mainProgram = "asm-lsp";
platforms = lib.platforms.unix;
};
}