load("//tools/install:install.bzl", "install_files")
load("//tools/lint:lint.bzl", "add_lint_tests")

package(default_visibility = ["//visibility:public"])

# Make our package requirements (but not manual scripts) available to
# downstream projects.
exports_files([
    "mac/binary_distribution/Brewfile",
    "mac/binary_distribution/requirements.txt",
    "mac/source_distribution/Brewfile",
    "mac/source_distribution/Brewfile-doc-only",
    "mac/source_distribution/Brewfile-maintainer-only",
    "mac/source_distribution/requirements.txt",
    "mac/source_distribution/requirements-maintainer-only.txt",
    "mac/source_distribution/requirements-test-only.txt",
    "ubuntu/binary_distribution/packages-jammy.txt",
    "ubuntu/source_distribution/packages-jammy.txt",
    "ubuntu/source_distribution/packages-jammy-clang.txt",
    "ubuntu/source_distribution/packages-jammy-doc-only.txt",
    "ubuntu/source_distribution/packages-jammy-maintainer-only.txt",
    "ubuntu/source_distribution/packages-jammy-test-only.txt",
    "ubuntu/binary_distribution/packages-noble.txt",
    "ubuntu/source_distribution/packages-noble.txt",
    "ubuntu/source_distribution/packages-noble-clang.txt",
    "ubuntu/source_distribution/packages-noble-doc-only.txt",
    "ubuntu/source_distribution/packages-noble-maintainer-only.txt",
    "ubuntu/source_distribution/packages-noble-test-only.txt",
])

filegroup(
    name = "deepnote",
    srcs = [
        "deepnote/install_nginx",
        "deepnote/nginx-meshcat-proxy.conf",
    ],
    visibility = ["//bindings/pydrake:__subpackages__"],
)

install_files(
    name = "install",
    dest = "share/drake/setup",
    files = select({
        "//tools/cc_toolchain:apple": [
            "mac/binary_distribution/Brewfile",
            "mac/binary_distribution/install_prereqs.sh",
            "mac/binary_distribution/requirements.txt",
        ],
        "//tools/cc_toolchain:linux": [
            "deepnote/install_nginx",
            "deepnote/install_xvfb",
            "deepnote/nginx-meshcat-proxy.conf",
            "deepnote/xvfb",
            "ubuntu/binary_distribution/install_prereqs.sh",
            "ubuntu/binary_distribution/packages-jammy.txt",
            "ubuntu/binary_distribution/packages-noble.txt",
        ],
        "//conditions:default": [],
    }),
    strip_prefix = [
        "mac/binary_distribution",
        "ubuntu/binary_distribution",
    ],
    rename = {
        "share/drake/setup/install_prereqs.sh": "install_prereqs",
    },
)

add_lint_tests()
