2024-09-15 21:35:37 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pkg-config,
|
2024-10-11 23:50:57 +02:00
|
|
|
installShellFiles,
|
2024-09-15 21:35:37 +02:00
|
|
|
dbus,
|
|
|
|
stdenv,
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "veryl";
|
2025-04-01 09:41:10 +00:00
|
|
|
version = "0.15.0";
|
2024-09-15 21:35:37 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "veryl-lang";
|
|
|
|
repo = "veryl";
|
2025-04-08 02:51:45 -04:00
|
|
|
rev = "v${version}";
|
2025-04-01 09:41:10 +00:00
|
|
|
hash = "sha256-PeRz44agIKDPsgUhjPgm1Pn1oJb7Epyw0oj3xPCkj4k=";
|
2024-09-15 21:35:37 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2025-01-23 08:45:31 +01:00
|
|
|
useFetchCargoVendor = true;
|
2025-04-01 09:41:10 +00:00
|
|
|
cargoHash = "sha256-PD1S9h4cGGgfRBB0iZzY7GRTeclRhwWLrxvNVEs8OJY=";
|
2024-09-15 21:35:37 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2024-10-11 23:50:57 +02:00
|
|
|
installShellFiles
|
2024-09-15 21:35:37 +02:00
|
|
|
];
|
|
|
|
|
2025-04-14 09:29:14 -04:00
|
|
|
buildInputs = [
|
|
|
|
dbus
|
|
|
|
];
|
2024-09-15 21:35:37 +02:00
|
|
|
|
2024-10-11 23:50:57 +02:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
|
|
installShellCompletion --cmd veryl \
|
|
|
|
--bash <($out/bin/veryl metadata --completion bash) \
|
|
|
|
--fish <($out/bin/veryl metadata --completion fish) \
|
|
|
|
--zsh <($out/bin/veryl metadata --completion zsh)
|
|
|
|
'';
|
|
|
|
|
2024-09-15 21:35:37 +02:00
|
|
|
checkFlags = [
|
|
|
|
# takes over an hour
|
|
|
|
"--skip=tests::progress"
|
|
|
|
# tempfile::tempdir().unwrap() -> "No such file or directory"
|
|
|
|
"--skip=tests::bump_version"
|
|
|
|
"--skip=tests::bump_version_with_commit"
|
|
|
|
"--skip=tests::check"
|
|
|
|
"--skip=tests::load"
|
|
|
|
"--skip=tests::lockfile"
|
|
|
|
"--skip=tests::publish"
|
|
|
|
"--skip=tests::publish_with_commit"
|
|
|
|
# "Permission Denied", while making its cache dir?
|
|
|
|
"--skip=analyzer::test_25_dependency"
|
|
|
|
"--skip=analyzer::test_68_std"
|
|
|
|
"--skip=emitter::test_25_dependency"
|
|
|
|
"--skip=emitter::test_68_std"
|
2025-02-18 22:56:54 +01:00
|
|
|
"--skip=filelist::test"
|
|
|
|
"--skip=path::directory_directory"
|
|
|
|
"--skip=path::directory_target"
|
|
|
|
"--skip=path::source_directory"
|
|
|
|
"--skip=path::source_target"
|
2024-09-15 21:35:37 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Modern Hardware Description Language";
|
|
|
|
homepage = "https://veryl-lang.org/";
|
2025-03-11 22:18:38 +01:00
|
|
|
changelog = "https://github.com/veryl-lang/veryl/releases/tag/v${version}";
|
2024-09-15 21:35:37 +02:00
|
|
|
license = with lib.licenses; [
|
|
|
|
mit
|
|
|
|
asl20
|
|
|
|
];
|
|
|
|
maintainers = with lib.maintainers; [ pbsds ];
|
|
|
|
mainProgram = "veryl";
|
|
|
|
};
|
|
|
|
}
|