13 system = stdenv.hostPlatform.system;
15 buildBazelPackage rec {
18 # These environment variables are read in bazel/build-version.py to create
19 # a build string shown in the tools --version output.
20 # If env variables not set, it would attempt to extract it from .git/.
21 GIT_DATE = "2024-02-01";
22 GIT_VERSION = "v0.0-3515-g2d841599";
24 # Derive nix package version from GIT_VERSION: "v1.2-345-abcde" -> "1.2.345"
25 version = builtins.concatStringsSep "." (lib.take 3 (lib.drop 1 (builtins.splitVersion GIT_VERSION)));
27 src = fetchFromGitHub {
28 owner = "chipsalliance";
30 rev = "${GIT_VERSION}";
31 hash = "sha256-D/blcex/St1nLKvjzuKnmAJE8HVlGy8ampmXIxKK11M=";
36 "--//bazel:use_local_flex_bison"
37 "--java_runtime_version=local_jdk"
38 "--tool_java_runtime_version=local_jdk"
42 sha256 = "sha256-2YruKvU7OZQ7mKNrqYITat+cmf/DEytDElYw7CvkxJk=";
46 jdk # bazel uses that.
47 bison # We use local flex and bison as WORKSPACE sources fail
48 flex # .. to compile with newer glibc
54 bazel/build-version.py \
55 bazel/sh_test_with_runfiles_lib.sh \
56 common/lsp/dummy-ls_test.sh \
57 common/tools/patch_tool_test.sh \
58 common/tools/verible-transform-interactive.sh \
59 common/tools/verible-transform-interactive-test.sh \
64 removeRulesCC = false;
65 bazelTargets = [ ":install-binaries" ];
66 bazelTestTargets = [ "//..." ];
74 install bazel-bin/common/tools/verible-patch-tool "$out/bin"
76 V_TOOLS_DIR=bazel-bin/verilog/tools
77 install $V_TOOLS_DIR/diff/verible-verilog-diff "$out/bin"
78 install $V_TOOLS_DIR/formatter/verible-verilog-format "$out/bin"
79 install $V_TOOLS_DIR/kythe/verible-verilog-kythe-extractor "$out/bin"
80 install $V_TOOLS_DIR/lint/verible-verilog-lint "$out/bin"
81 install $V_TOOLS_DIR/ls/verible-verilog-ls "$out/bin"
82 install $V_TOOLS_DIR/obfuscator/verible-verilog-obfuscate "$out/bin"
83 install $V_TOOLS_DIR/preprocessor/verible-verilog-preprocessor "$out/bin"
84 install $V_TOOLS_DIR/project/verible-verilog-project "$out/bin"
85 install $V_TOOLS_DIR/syntax/verible-verilog-syntax "$out/bin"
90 description = "Suite of SystemVerilog developer tools. Including a style-linter, indexer, formatter, and language server.";
91 homepage = "https://github.com/chipsalliance/verible";
92 license = licenses.asl20;
93 maintainers = with maintainers; [ hzeller newam ];
94 # Platforms linux only currently; some LIBTOOL issue on Darwin w/ bazel
95 platforms = platforms.linux;