veridian: init at d094c9d

This commit is contained in:
hakan-demirli 2025-02-18 01:03:04 +03:00
parent dd122a26f0
commit 9ad8aafad2

View file

@ -0,0 +1,81 @@
{
lib,
rustPlatform,
fetchFromGitHub,
cmake,
makeWrapper,
pkg-config,
boost,
fmt_11,
openssl,
sv-lang,
mimalloc,
verible,
verilator,
}:
rustPlatform.buildRustPackage {
pname = "veridian";
version = "0-unstable-2024-12-25";
src = fetchFromGitHub {
owner = "vivekmalneedi";
repo = "veridian";
rev = "d094c9d2fa9745b2c4430eef052478c64d5dd3b6";
hash = "sha256-3KjUunXTqdesvgDSeQMoXL0LRGsGQXZJGDt+xLWGovM=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-qJQD9HjSrrHdppbLNgLnXCycgzbmPePydZve3A8zGtU=";
buildFeatures = [ "slang" ];
nativeBuildInputs = [
rustPlatform.bindgenHook
cmake
makeWrapper
pkg-config
];
buildInputs = [
boost
fmt_11
openssl
sv-lang
mimalloc
];
# the tests also need these to be on the PATH
nativeCheckInputs = [
verible
verilator
];
postInstall =
let
runtimePathDeps = [
verible
verilator
];
in
''
wrapProgram $out/bin/veridian \
--prefix PATH : ${lib.makeBinPath runtimePathDeps}
'';
env = {
OPENSSL_NO_VENDOR = "1";
RUSTFLAGS = "-C link-args=-lmimalloc";
# this is needed so that veridian doesn't try to build the sv-lang package itself
SLANG_INSTALL_PATH = sv-lang;
};
meta = {
description = "SystemVerilog Language Server";
homepage = "https://github.com/vivekmalneedi/veridian";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.hakan-demirli ];
};
}