diff options
Diffstat (limited to 'pkgs/by-name/ve/veryl/package.nix')
-rw-r--r-- | pkgs/by-name/ve/veryl/package.nix | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/by-name/ve/veryl/package.nix b/pkgs/by-name/ve/veryl/package.nix new file mode 100644 index 000000000000..c59dc81710e5 --- /dev/null +++ b/pkgs/by-name/ve/veryl/package.nix @@ -0,0 +1,78 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + installShellFiles, + dbus, + stdenv, + darwin, +}: + +rustPlatform.buildRustPackage rec { + pname = "veryl"; + version = "0.13.2"; + + src = fetchFromGitHub { + owner = "veryl-lang"; + repo = "veryl"; + rev = "v${version}"; + hash = "sha256-LSQ3ZM7BWXiwBqlw6usImpt+w+wC2EvkoAMblTb0pvg="; + fetchSubmodules = true; + }; + + cargoHash = "sha256-w7mB0cAN5aRO1pw21BDIFUtnYUJUoYjW+7nXFCBfYgM="; + + nativeBuildInputs = [ + pkg-config + installShellFiles + ]; + + buildInputs = + [ + dbus + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.CoreServices + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.SystemConfiguration + ]; + + 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) + ''; + + 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" + ]; + + meta = { + description = "Modern Hardware Description Language"; + homepage = "https://veryl-lang.org/"; + changelog = "https://github.com/veryl-lang/veryl/blob/${src.rev}/CHANGELOG.md"; + license = with lib.licenses; [ + mit + asl20 + ]; + maintainers = with lib.maintainers; [ pbsds ]; + mainProgram = "veryl"; + }; +} |