From 299949be44325dfdc185e0134eb297750d3dbf30 Mon Sep 17 00:00:00 2001 From: iphydf Date: Mon, 30 Dec 2024 02:15:19 +0000 Subject: [PATCH] cleanup: Rename `BUILD.*` to `*.BUILD`. --- .bazelversion | 1 + .github/workflows/ci.yml | 13 +++ WORKSPACE | 110 ++++++------------ third_party/BUILD.bazel | 19 ++- third_party/BUILD.bazel_toolchain | 1 - third_party/BUILD.gdk-pixbuf | 10 -- third_party/BUILD.glib | 11 -- third_party/BUILD.glib.out | 21 ---- third_party/BUILD.libnotify | 14 --- third_party/{BUILD.asound => asound.BUILD} | 0 .../{BUILD.autoconf => autoconf.BUILD} | 0 .../{BUILD.automake => automake.BUILD} | 0 third_party/{BUILD.bzip2 => bzip2.BUILD} | 0 third_party/{BUILD.cmake => cmake.BUILD} | 0 .../{BUILD.diffutils => diffutils.BUILD} | 0 third_party/{BUILD.ev => ev.BUILD} | 0 third_party/{BUILD.ffmpeg => ffmpeg.BUILD} | 0 .../{BUILD.ffnvcodec => ffnvcodec.BUILD} | 0 third_party/{BUILD.gettext => gettext.BUILD} | 0 third_party/{BUILD.gl => gl.BUILD} | 0 third_party/{BUILD.glvnd => glvnd.BUILD} | 0 third_party/{BUILD.gnumake => gnumake.BUILD} | 0 .../haskell/{BUILD.alex => alex.BUILD} | 0 .../haskell/{BUILD.happy => happy.BUILD} | 0 third_party/haskell/haskell.bzl | 26 ----- ...LD.hspec-discover => hspec-discover.BUILD} | 0 third_party/{BUILD.json => json.BUILD} | 0 third_party/{BUILD.libcap => libcap.BUILD} | 0 third_party/{BUILD.libexif => libexif.BUILD} | 0 third_party/{BUILD.libidn2 => libidn2.BUILD} | 0 .../{BUILD.libqrencode => libqrencode.BUILD} | 0 .../{BUILD.libsodium => libsodium.BUILD} | 0 third_party/{BUILD.libtool => libtool.BUILD} | 0 third_party/{BUILD.libvpx => libvpx.BUILD} | 5 +- third_party/{BUILD.libxz => libxz.BUILD} | 0 third_party/{BUILD.libzmq => libzmq.BUILD} | 0 third_party/{BUILD.m4 => m4.BUILD} | 0 third_party/{BUILD.mypy => mypy.BUILD} | 0 ....mypy_extensions => mypy_extensions.BUILD} | 0 third_party/{BUILD.ncurses => ncurses.BUILD} | 0 third_party/{BUILD.openal => openal.BUILD} | 0 third_party/{BUILD.openssl => openssl.BUILD} | 0 third_party/{BUILD.opus => opus.BUILD} | 0 third_party/{BUILD.perl => perl.BUILD} | 0 third_party/{BUILD.psocket => psocket.BUILD} | 0 third_party/{BUILD.pthread => pthread.BUILD} | 0 .../{BUILD.pthread_w32 => pthread_w32.BUILD} | 0 third_party/{BUILD.qt => qt.BUILD} | 0 .../qt/{BUILD.qtbase.dev => qtbase.dev.BUILD} | 0 .../qt/{BUILD.qtbase.out => qtbase.out.BUILD} | 0 .../qt/{BUILD.qtsvg.dev => qtsvg.dev.BUILD} | 0 .../qt/{BUILD.qtsvg.out => qtsvg.out.BUILD} | 0 third_party/{BUILD.sdl2 => sdl2.BUILD} | 0 .../{BUILD.sqlcipher => sqlcipher.BUILD} | 0 third_party/{BUILD.tcl => tcl.BUILD} | 0 .../{BUILD.typeshed => typeshed.BUILD} | 0 ...ing_extensions => typing_extensions.BUILD} | 0 third_party/{BUILD.x11 => x11.BUILD} | 0 third_party/{BUILD.xcb => xcb.BUILD} | 0 third_party/{BUILD.xext => xext.BUILD} | 0 third_party/{BUILD.xproto => xproto.BUILD} | 0 third_party/{BUILD.xss => xss.BUILD} | 0 third_party/{BUILD.xxf86vm => xxf86vm.BUILD} | 0 third_party/{BUILD.yasm => yasm.BUILD} | 0 .../src/home/.config/home-manager/home.nix | 2 +- tools/built/src/home/.vimrc | 2 +- tools/workspace/github.bzl | 2 +- tools/workspace/local.bzl | 2 +- tools/workspace/qt.bzl | 2 +- 69 files changed, 64 insertions(+), 177 deletions(-) create mode 100644 .bazelversion delete mode 100644 third_party/BUILD.bazel_toolchain delete mode 100644 third_party/BUILD.gdk-pixbuf delete mode 100644 third_party/BUILD.glib delete mode 100755 third_party/BUILD.glib.out delete mode 100644 third_party/BUILD.libnotify rename third_party/{BUILD.asound => asound.BUILD} (100%) rename third_party/{BUILD.autoconf => autoconf.BUILD} (100%) rename third_party/{BUILD.automake => automake.BUILD} (100%) rename third_party/{BUILD.bzip2 => bzip2.BUILD} (100%) rename third_party/{BUILD.cmake => cmake.BUILD} (100%) rename third_party/{BUILD.diffutils => diffutils.BUILD} (100%) rename third_party/{BUILD.ev => ev.BUILD} (100%) rename third_party/{BUILD.ffmpeg => ffmpeg.BUILD} (100%) rename third_party/{BUILD.ffnvcodec => ffnvcodec.BUILD} (100%) rename third_party/{BUILD.gettext => gettext.BUILD} (100%) rename third_party/{BUILD.gl => gl.BUILD} (100%) rename third_party/{BUILD.glvnd => glvnd.BUILD} (100%) rename third_party/{BUILD.gnumake => gnumake.BUILD} (100%) rename third_party/haskell/{BUILD.alex => alex.BUILD} (100%) rename third_party/haskell/{BUILD.happy => happy.BUILD} (100%) delete mode 100644 third_party/haskell/haskell.bzl rename third_party/haskell/{BUILD.hspec-discover => hspec-discover.BUILD} (100%) rename third_party/{BUILD.json => json.BUILD} (100%) rename third_party/{BUILD.libcap => libcap.BUILD} (100%) rename third_party/{BUILD.libexif => libexif.BUILD} (100%) rename third_party/{BUILD.libidn2 => libidn2.BUILD} (100%) rename third_party/{BUILD.libqrencode => libqrencode.BUILD} (100%) rename third_party/{BUILD.libsodium => libsodium.BUILD} (100%) rename third_party/{BUILD.libtool => libtool.BUILD} (100%) rename third_party/{BUILD.libvpx => libvpx.BUILD} (98%) rename third_party/{BUILD.libxz => libxz.BUILD} (100%) rename third_party/{BUILD.libzmq => libzmq.BUILD} (100%) rename third_party/{BUILD.m4 => m4.BUILD} (100%) rename third_party/{BUILD.mypy => mypy.BUILD} (100%) rename third_party/{BUILD.mypy_extensions => mypy_extensions.BUILD} (100%) rename third_party/{BUILD.ncurses => ncurses.BUILD} (100%) rename third_party/{BUILD.openal => openal.BUILD} (100%) rename third_party/{BUILD.openssl => openssl.BUILD} (100%) rename third_party/{BUILD.opus => opus.BUILD} (100%) rename third_party/{BUILD.perl => perl.BUILD} (100%) rename third_party/{BUILD.psocket => psocket.BUILD} (100%) rename third_party/{BUILD.pthread => pthread.BUILD} (100%) rename third_party/{BUILD.pthread_w32 => pthread_w32.BUILD} (100%) rename third_party/{BUILD.qt => qt.BUILD} (100%) rename third_party/qt/{BUILD.qtbase.dev => qtbase.dev.BUILD} (100%) rename third_party/qt/{BUILD.qtbase.out => qtbase.out.BUILD} (100%) rename third_party/qt/{BUILD.qtsvg.dev => qtsvg.dev.BUILD} (100%) rename third_party/qt/{BUILD.qtsvg.out => qtsvg.out.BUILD} (100%) rename third_party/{BUILD.sdl2 => sdl2.BUILD} (100%) rename third_party/{BUILD.sqlcipher => sqlcipher.BUILD} (100%) rename third_party/{BUILD.tcl => tcl.BUILD} (100%) rename third_party/{BUILD.typeshed => typeshed.BUILD} (100%) rename third_party/{BUILD.typing_extensions => typing_extensions.BUILD} (100%) rename third_party/{BUILD.x11 => x11.BUILD} (100%) rename third_party/{BUILD.xcb => xcb.BUILD} (100%) rename third_party/{BUILD.xext => xext.BUILD} (100%) rename third_party/{BUILD.xproto => xproto.BUILD} (100%) rename third_party/{BUILD.xss => xss.BUILD} (100%) rename third_party/{BUILD.xxf86vm => xxf86vm.BUILD} (100%) rename third_party/{BUILD.yasm => yasm.BUILD} (100%) diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 00000000..815da58b --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +7.4.1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85681784..cab01df3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,6 +69,19 @@ jobs: sed -i -e 's/ --remote_download_outputs=all//' tools/built/src/setup-dev.sh docker build -t toxchat/toktok-stack:latest-dev -f tools/built/src/Dockerfile.dev . + local-build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Download bazelisk + run: | + wget https://github.com/bazelbuild/bazelisk/releases/download/v1.25.0/bazelisk-amd64.deb + sudo apt-get install ./bazelisk-amd64.deb + - name: Build + run: bazel build --config=local //... + mypy: runs-on: ubuntu-22.04 steps: diff --git a/WORKSPACE b/WORKSPACE index e741c7ca..1bdf221f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -222,49 +222,49 @@ nixpkgs_python_configure( nixpkgs_package( name = "diffutils", - build_file = "//third_party:BUILD.diffutils", + build_file = "//third_party:diffutils.BUILD", repository = "@nixpkgs", ) nixpkgs_package( name = "autoconf", - build_file = "//third_party:BUILD.autoconf", + build_file = "//third_party:autoconf.BUILD", repository = "@nixpkgs", ) nixpkgs_package( name = "automake", - build_file = "//third_party:BUILD.automake", + build_file = "//third_party:automake.BUILD", repository = "@nixpkgs", ) nixpkgs_package( name = "libtool", - build_file = "//third_party:BUILD.libtool", + build_file = "//third_party:libtool.BUILD", repository = "@nixpkgs", ) nixpkgs_package( name = "m4", - build_file = "//third_party:BUILD.m4", + build_file = "//third_party:m4.BUILD", repository = "@nixpkgs", ) nixpkgs_package( name = "cmake", - build_file = "//third_party:BUILD.cmake", + build_file = "//third_party:cmake.BUILD", repository = "@nixpkgs", ) nixpkgs_package( name = "gnumake", - build_file = "//third_party:BUILD.gnumake", + build_file = "//third_party:gnumake.BUILD", repository = "@nixpkgs", ) nixpkgs_package( name = "perl", - build_file = "//third_party:BUILD.perl", + build_file = "//third_party:perl.BUILD", repository = "@nixpkgs", ) @@ -383,7 +383,7 @@ haskell_register_ghc_nixpkgs( [nixpkgs_package( name = "haskellPackages." + tool, - build_file = "//third_party/haskell:BUILD." + tool, + build_file = "//third_party/haskell:" + tool + ".BUILD", repository = "@nixpkgs", ) for tool in [ "alex", @@ -452,7 +452,7 @@ nixpkgs_package( nixpkgs_package( name = "asound", attribute_path = "alsa-lib.dev", - build_file = "//third_party:BUILD.asound", + build_file = "//third_party:asound.BUILD", repository = "@nixpkgs", ) @@ -465,14 +465,14 @@ nixpkgs_package( nixpkgs_package( name = "openssl", attribute_path = "openssl.dev", - build_file = "//third_party:BUILD.openssl", + build_file = "//third_party:openssl.BUILD", repository = "@nixpkgs", ) # https://ftp.gnu.org/pub/gnu/ncurses http_archive( name = "ncurses", - build_file = "@toktok//third_party:BUILD.ncurses", + build_file = "@toktok//third_party:ncurses.BUILD", integrity = "sha256-E22RvCaamleF5fnpgLx2q1dCj2BM4+WlqQzrx2eXHMY=", strip_prefix = "ncurses-6.5", urls = ["https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.5.tar.gz"], @@ -480,7 +480,7 @@ http_archive( http_archive( name = "ev", - build_file = "@toktok//third_party:BUILD.ev", + build_file = "@toktok//third_party:ev.BUILD", sha256 = "507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea", strip_prefix = "libev-4.33", urls = ["http://dist.schmorp.de/libev/libev-4.33.tar.gz"], @@ -488,7 +488,7 @@ http_archive( http_archive( name = "bzip2", - build_file = "@toktok//third_party:BUILD.bzip2", + build_file = "@toktok//third_party:bzip2.BUILD", sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269", strip_prefix = "bzip2-1.0.8", urls = ["https://www.sourceware.org/pub/bzip2/bzip2-latest.tar.gz"], @@ -521,7 +521,7 @@ new_github_archive( # https://ffmpeg.org/releases http_archive( name = "ffmpeg", - build_file = "@toktok//third_party:BUILD.ffmpeg", + build_file = "@toktok//third_party:ffmpeg.BUILD", sha256 = "fd59e6160476095082e94150ada5a6032d7dcc282fe38ce682a00c18e7820528", strip_prefix = "ffmpeg-7.1", urls = ["https://ffmpeg.org/releases/ffmpeg-7.1.tar.bz2"], @@ -530,7 +530,7 @@ http_archive( # https://ftp.gnu.org/pub/gnu/gettext http_archive( name = "gettext", - build_file = "@toktok//third_party:BUILD.gettext", + build_file = "@toktok//third_party:gettext.BUILD", sha256 = "ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0", strip_prefix = "gettext-0.22.5", urls = ["https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.5.tar.gz"], @@ -545,7 +545,7 @@ nixpkgs_package( nixpkgs_package( name = "gl", attribute_path = "libGL.dev", - build_file = "@toktok//third_party:BUILD.gl", + build_file = "@toktok//third_party:gl.BUILD", repository = "@nixpkgs", ) @@ -558,14 +558,14 @@ nixpkgs_package( nixpkgs_package( name = "glvnd", attribute_path = "libglvnd.dev", - build_file = "@toktok//third_party:BUILD.glvnd", + build_file = "@toktok//third_party:glvnd.BUILD", repository = "@nixpkgs", ) # https://github.com/nlohmann/json http_archive( name = "json", - build_file = "@toktok//third_party:BUILD.json", + build_file = "@toktok//third_party:json.BUILD", sha256 = "a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d", strip_prefix = "include", urls = ["https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip"], @@ -573,7 +573,7 @@ http_archive( http_archive( name = "libcap", - build_file = "@toktok//third_party:BUILD.libcap", + build_file = "@toktok//third_party:libcap.BUILD", sha256 = "db7de848064e656a0bb528dae6d53ff20c82e849d509cecd015a04d2fec8369d", strip_prefix = "libcap-2.33", urls = ["https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.33.tar.gz"], @@ -589,7 +589,7 @@ new_github_archive( http_archive( name = "libidn2", - build_file = "@toktok//third_party:BUILD.libidn2", + build_file = "@toktok//third_party:libidn2.BUILD", sha256 = "e1cb1db3d2e249a6a3eb6f0946777c2e892d5c5dc7bd91c74394fc3a01cab8b5", strip_prefix = "libidn2-2.3.0", urls = ["https://ftp.gnu.org/gnu/libidn/libidn2-2.3.0.tar.gz"], @@ -648,7 +648,7 @@ new_github_archive( http_archive( name = "pthread_w32", - build_file = "@toktok//third_party:BUILD.pthread_w32", + build_file = "@toktok//third_party:pthread_w32.BUILD", sha256 = "e6aca7aea8de33d9c8580bcb3a0ea3ec0a7ace4ba3f4e263ac7c7b66bc95fb4d", strip_prefix = "pthreads-w32-2-9-1-release", urls = ["https://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz"], @@ -656,20 +656,20 @@ http_archive( new_local_repository( name = "pthread", - build_file = "//third_party:BUILD.pthread", + build_file = "//third_party:pthread.BUILD", path = "third_party/pthread", ) new_local_repository( name = "psocket", - build_file = "//third_party:BUILD.psocket", + build_file = "//third_party:psocket.BUILD", path = "third_party", ) # https://github.com/tukaani-project/xz/releases http_archive( name = "libxz", - build_file = "@toktok//third_party:BUILD.libxz", + build_file = "@toktok//third_party:libxz.BUILD", sha256 = "b1d45295d3f71f25a4c9101bd7c8d16cb56348bbef3bbc738da0351e17c73317", strip_prefix = "xz-5.6.3", urls = ["https://github.com/tukaani-project/xz/releases/download/v5.6.3/xz-5.6.3.tar.gz"], @@ -677,7 +677,7 @@ http_archive( http_archive( name = "sdl2", - build_file = "@toktok//third_party:BUILD.sdl2", + build_file = "@toktok//third_party:sdl2.BUILD", sha256 = "349268f695c02efbc9b9148a70b85e58cefbbf704abd3e91be654db7f1e2c863", strip_prefix = "SDL2-2.0.12", urls = ["https://github.com/libsdl-org/SDL/releases/download/release-2.0.12/SDL2-2.0.12.tar.gz"], @@ -703,46 +703,6 @@ new_github_archive( version = "a18a9d248b4794c7a0c70698c2575bc78d3c1ae4", ) -nixpkgs_package( - name = "libnotify.out", - attribute_path = "libnotify", - repository = "@nixpkgs", -) - -nixpkgs_package( - name = "libnotify", - attribute_path = "libnotify.dev", - build_file = "@toktok//third_party:BUILD.libnotify", - repository = "@nixpkgs", -) - -nixpkgs_package( - name = "gdk-pixbuf.out", - attribute_path = "gdk-pixbuf", - repository = "@nixpkgs", -) - -nixpkgs_package( - name = "gdk-pixbuf", - attribute_path = "gdk-pixbuf.dev", - build_file = "@toktok//third_party:BUILD.gdk-pixbuf", - repository = "@nixpkgs", -) - -nixpkgs_package( - name = "glib.out", - attribute_path = "glib.out", - build_file = "@toktok//third_party:BUILD.glib.out", - repository = "@nixpkgs", -) - -nixpkgs_package( - name = "glib", - attribute_path = "glib.dev", - build_file = "@toktok//third_party:BUILD.glib", - repository = "@nixpkgs", -) - nixpkgs_package( name = "x11.out", attribute_path = "xorg.libX11.out", @@ -752,7 +712,7 @@ nixpkgs_package( nixpkgs_package( name = "x11", attribute_path = "xorg.libX11.dev", - build_file = "@toktok//third_party:BUILD.x11", + build_file = "@toktok//third_party:x11.BUILD", repository = "@nixpkgs", ) @@ -765,7 +725,7 @@ nixpkgs_package( nixpkgs_package( name = "xcb", attribute_path = "xorg.libxcb.dev", - build_file = "@toktok//third_party:BUILD.xcb", + build_file = "@toktok//third_party:xcb.BUILD", repository = "@nixpkgs", ) @@ -778,7 +738,7 @@ nixpkgs_package( nixpkgs_package( name = "xext", attribute_path = "xorg.libXext.dev", - build_file = "@toktok//third_party:BUILD.xext", + build_file = "@toktok//third_party:xext.BUILD", repository = "@nixpkgs", ) @@ -791,21 +751,21 @@ nixpkgs_package( nixpkgs_package( name = "xxf86vm", attribute_path = "xorg.libXxf86vm.dev", - build_file = "@toktok//third_party:BUILD.xxf86vm", + build_file = "@toktok//third_party:xxf86vm.BUILD", repository = "@nixpkgs", ) nixpkgs_package( name = "xproto", attribute_path = "xorg.xorgproto.out", - build_file = "@toktok//third_party:BUILD.xproto", + build_file = "@toktok//third_party:xproto.BUILD", repository = "@nixpkgs", ) nixpkgs_package( name = "xss", attribute_path = "xorg.libXScrnSaver", - build_file = "@toktok//third_party:BUILD.xss", + build_file = "@toktok//third_party:xss.BUILD", repository = "@nixpkgs", ) @@ -864,20 +824,20 @@ QT_LIBS = [ [nixpkgs_package( name = "qt6.qt%s.out" % lib, - build_file = "//third_party/qt:BUILD.qt%s.out" % lib, + build_file = "//third_party/qt:qt%s.out.BUILD" % lib, repository = "@nixpkgs", ) for lib in QT_LIBS] [nixpkgs_package( name = "qt6.qt%s" % lib, - build_file = "//third_party/qt:BUILD.qt%s.dev" % lib, + build_file = "//third_party/qt:qt%s.dev.BUILD" % lib, repository = "@nixpkgs", ) for lib in QT_LIBS] nixpkgs_package( name = "qt", attribute_path = "qt6.qttools.dev", - build_file = "//third_party:BUILD.qt", + build_file = "//third_party:qt.BUILD", repository = "@nixpkgs", ) diff --git a/third_party/BUILD.bazel b/third_party/BUILD.bazel index fc0cf4bc..6aaa5980 100644 --- a/third_party/BUILD.bazel +++ b/third_party/BUILD.bazel @@ -4,18 +4,17 @@ filegroup( name = "third_party", srcs = select({ "@toktok//tools/config:arm64": [], - "@toktok//tools/config:linux-x86_64": ["@{pkg}//:{pkg}".format(pkg = pkg[len("BUILD."):]) for pkg in glob( - ["BUILD.*"], + "@toktok//tools/config:linux-x86_64": ["@{pkg}//:{pkg}".format(pkg = pkg[:-len(".BUILD")]) for pkg in glob( + ["*.BUILD"], exclude = [ - "BUILD.bazel*", - "BUILD.*.out", + "*.out.BUILD", # TODO - "BUILD.asound", - "BUILD.ffmpeg", - "BUILD.openal", - "BUILD.openssl", - "BUILD.sdl2", - "BUILD.x264", + "asound.BUILD", + "ffmpeg.BUILD", + "openal.BUILD", + "openssl.BUILD", + "sdl2.BUILD", + "x264.BUILD", ], )] + [ "@com_google_googletest//:gtest", diff --git a/third_party/BUILD.bazel_toolchain b/third_party/BUILD.bazel_toolchain deleted file mode 100644 index f2e96d36..00000000 --- a/third_party/BUILD.bazel_toolchain +++ /dev/null @@ -1 +0,0 @@ -# This just exists so there's a BUILD file in @bazel_toolchain. diff --git a/third_party/BUILD.gdk-pixbuf b/third_party/BUILD.gdk-pixbuf deleted file mode 100644 index c8d01dbd..00000000 --- a/third_party/BUILD.gdk-pixbuf +++ /dev/null @@ -1,10 +0,0 @@ -# bazel -load("@rules_cc//cc:defs.bzl", "cc_library") - -cc_library( - name = "gdk-pixbuf", - srcs = ["@gdk-pixbuf.out//:lib"], - hdrs = glob(["include/gdk-pixbuf-2.0/**/*.h"]), - strip_include_prefix = "include/gdk-pixbuf-2.0", - visibility = ["//visibility:public"], -) diff --git a/third_party/BUILD.glib b/third_party/BUILD.glib deleted file mode 100644 index cdb74de6..00000000 --- a/third_party/BUILD.glib +++ /dev/null @@ -1,11 +0,0 @@ -# bazel -load("@rules_cc//cc:defs.bzl", "cc_library") - -cc_library( - name = "glib", - srcs = ["@glib.out//:lib"], - hdrs = glob(["include/glib-2.0/**/*.h"]), - strip_include_prefix = "include/glib-2.0", - visibility = ["//visibility:public"], - deps = ["@glib.out//:glibconfig"], -) diff --git a/third_party/BUILD.glib.out b/third_party/BUILD.glib.out deleted file mode 100755 index 00e45ab5..00000000 --- a/third_party/BUILD.glib.out +++ /dev/null @@ -1,21 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_library") - -filegroup( - name = "lib", - srcs = glob( - [ - "lib/**/*.so*", - "lib/**/*.dylib", - "lib/**/*.a", - ], - allow_empty = True, - ), - visibility = ["@glib//:__pkg__"], -) - -cc_library( - name = "glibconfig", - hdrs = ["lib/glib-2.0/include/glibconfig.h"], - strip_include_prefix = "lib/glib-2.0/include", - visibility = ["@glib//:__pkg__"], -) diff --git a/third_party/BUILD.libnotify b/third_party/BUILD.libnotify deleted file mode 100644 index 22da2c3e..00000000 --- a/third_party/BUILD.libnotify +++ /dev/null @@ -1,14 +0,0 @@ -# bazel -load("@rules_cc//cc:defs.bzl", "cc_library") - -cc_library( - name = "libnotify", - srcs = ["@libnotify.out//:lib"], - hdrs = glob(["include/libnotify/*.h"]), - strip_include_prefix = "include", - visibility = ["//visibility:public"], - deps = [ - "@gdk-pixbuf", - "@glib", - ], -) diff --git a/third_party/BUILD.asound b/third_party/asound.BUILD similarity index 100% rename from third_party/BUILD.asound rename to third_party/asound.BUILD diff --git a/third_party/BUILD.autoconf b/third_party/autoconf.BUILD similarity index 100% rename from third_party/BUILD.autoconf rename to third_party/autoconf.BUILD diff --git a/third_party/BUILD.automake b/third_party/automake.BUILD similarity index 100% rename from third_party/BUILD.automake rename to third_party/automake.BUILD diff --git a/third_party/BUILD.bzip2 b/third_party/bzip2.BUILD similarity index 100% rename from third_party/BUILD.bzip2 rename to third_party/bzip2.BUILD diff --git a/third_party/BUILD.cmake b/third_party/cmake.BUILD similarity index 100% rename from third_party/BUILD.cmake rename to third_party/cmake.BUILD diff --git a/third_party/BUILD.diffutils b/third_party/diffutils.BUILD similarity index 100% rename from third_party/BUILD.diffutils rename to third_party/diffutils.BUILD diff --git a/third_party/BUILD.ev b/third_party/ev.BUILD similarity index 100% rename from third_party/BUILD.ev rename to third_party/ev.BUILD diff --git a/third_party/BUILD.ffmpeg b/third_party/ffmpeg.BUILD similarity index 100% rename from third_party/BUILD.ffmpeg rename to third_party/ffmpeg.BUILD diff --git a/third_party/BUILD.ffnvcodec b/third_party/ffnvcodec.BUILD similarity index 100% rename from third_party/BUILD.ffnvcodec rename to third_party/ffnvcodec.BUILD diff --git a/third_party/BUILD.gettext b/third_party/gettext.BUILD similarity index 100% rename from third_party/BUILD.gettext rename to third_party/gettext.BUILD diff --git a/third_party/BUILD.gl b/third_party/gl.BUILD similarity index 100% rename from third_party/BUILD.gl rename to third_party/gl.BUILD diff --git a/third_party/BUILD.glvnd b/third_party/glvnd.BUILD similarity index 100% rename from third_party/BUILD.glvnd rename to third_party/glvnd.BUILD diff --git a/third_party/BUILD.gnumake b/third_party/gnumake.BUILD similarity index 100% rename from third_party/BUILD.gnumake rename to third_party/gnumake.BUILD diff --git a/third_party/haskell/BUILD.alex b/third_party/haskell/alex.BUILD similarity index 100% rename from third_party/haskell/BUILD.alex rename to third_party/haskell/alex.BUILD diff --git a/third_party/haskell/BUILD.happy b/third_party/haskell/happy.BUILD similarity index 100% rename from third_party/haskell/BUILD.happy rename to third_party/haskell/happy.BUILD diff --git a/third_party/haskell/haskell.bzl b/third_party/haskell/haskell.bzl deleted file mode 100644 index e66a0fa2..00000000 --- a/third_party/haskell/haskell.bzl +++ /dev/null @@ -1,26 +0,0 @@ -"""Workspace rules for importing Haskell packages.""" - -load("@ai_formation_hazel//tools:mangling.bzl", "hazel_workspace") -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -def new_cabal_package(package, sha256 = None, url = None, strip_prefix = None, patches = None, path = None): - url = url or "https://hackage.haskell.org/package/%s/%s.tar.gz" % (package, package) - strip_prefix = strip_prefix or package - - package_name, _ = package.rsplit("-", 1) - - if path: - native.new_local_repository( - name = hazel_workspace(package_name), - build_file = "@toktok//third_party/haskell:BUILD.%s" % package_name, - path = path, - ) - else: - http_archive( - name = hazel_workspace(package_name), - build_file = "@toktok//third_party/haskell:BUILD.%s" % package_name, - patches = patches, - sha256 = sha256, - strip_prefix = strip_prefix, - urls = [url], - ) diff --git a/third_party/haskell/BUILD.hspec-discover b/third_party/haskell/hspec-discover.BUILD similarity index 100% rename from third_party/haskell/BUILD.hspec-discover rename to third_party/haskell/hspec-discover.BUILD diff --git a/third_party/BUILD.json b/third_party/json.BUILD similarity index 100% rename from third_party/BUILD.json rename to third_party/json.BUILD diff --git a/third_party/BUILD.libcap b/third_party/libcap.BUILD similarity index 100% rename from third_party/BUILD.libcap rename to third_party/libcap.BUILD diff --git a/third_party/BUILD.libexif b/third_party/libexif.BUILD similarity index 100% rename from third_party/BUILD.libexif rename to third_party/libexif.BUILD diff --git a/third_party/BUILD.libidn2 b/third_party/libidn2.BUILD similarity index 100% rename from third_party/BUILD.libidn2 rename to third_party/libidn2.BUILD diff --git a/third_party/BUILD.libqrencode b/third_party/libqrencode.BUILD similarity index 100% rename from third_party/BUILD.libqrencode rename to third_party/libqrencode.BUILD diff --git a/third_party/BUILD.libsodium b/third_party/libsodium.BUILD similarity index 100% rename from third_party/BUILD.libsodium rename to third_party/libsodium.BUILD diff --git a/third_party/BUILD.libtool b/third_party/libtool.BUILD similarity index 100% rename from third_party/BUILD.libtool rename to third_party/libtool.BUILD diff --git a/third_party/BUILD.libvpx b/third_party/libvpx.BUILD similarity index 98% rename from third_party/BUILD.libvpx rename to third_party/libvpx.BUILD index 48101b96..f6ba8a5c 100644 --- a/third_party/BUILD.libvpx +++ b/third_party/libvpx.BUILD @@ -224,10 +224,7 @@ cc_library( "vpx/vpx_encoder.h", "vpx/vpx_image.h", ], - copts = [ - "-I$(GENDIR)/external/libvpx", - "-Iexternal/libvpx", - ] + select({ + copts = select({ "@toktok//tools/config:windows": [], "//conditions:default": ["-fvisibility=protected"], }), diff --git a/third_party/BUILD.libxz b/third_party/libxz.BUILD similarity index 100% rename from third_party/BUILD.libxz rename to third_party/libxz.BUILD diff --git a/third_party/BUILD.libzmq b/third_party/libzmq.BUILD similarity index 100% rename from third_party/BUILD.libzmq rename to third_party/libzmq.BUILD diff --git a/third_party/BUILD.m4 b/third_party/m4.BUILD similarity index 100% rename from third_party/BUILD.m4 rename to third_party/m4.BUILD diff --git a/third_party/BUILD.mypy b/third_party/mypy.BUILD similarity index 100% rename from third_party/BUILD.mypy rename to third_party/mypy.BUILD diff --git a/third_party/BUILD.mypy_extensions b/third_party/mypy_extensions.BUILD similarity index 100% rename from third_party/BUILD.mypy_extensions rename to third_party/mypy_extensions.BUILD diff --git a/third_party/BUILD.ncurses b/third_party/ncurses.BUILD similarity index 100% rename from third_party/BUILD.ncurses rename to third_party/ncurses.BUILD diff --git a/third_party/BUILD.openal b/third_party/openal.BUILD similarity index 100% rename from third_party/BUILD.openal rename to third_party/openal.BUILD diff --git a/third_party/BUILD.openssl b/third_party/openssl.BUILD similarity index 100% rename from third_party/BUILD.openssl rename to third_party/openssl.BUILD diff --git a/third_party/BUILD.opus b/third_party/opus.BUILD similarity index 100% rename from third_party/BUILD.opus rename to third_party/opus.BUILD diff --git a/third_party/BUILD.perl b/third_party/perl.BUILD similarity index 100% rename from third_party/BUILD.perl rename to third_party/perl.BUILD diff --git a/third_party/BUILD.psocket b/third_party/psocket.BUILD similarity index 100% rename from third_party/BUILD.psocket rename to third_party/psocket.BUILD diff --git a/third_party/BUILD.pthread b/third_party/pthread.BUILD similarity index 100% rename from third_party/BUILD.pthread rename to third_party/pthread.BUILD diff --git a/third_party/BUILD.pthread_w32 b/third_party/pthread_w32.BUILD similarity index 100% rename from third_party/BUILD.pthread_w32 rename to third_party/pthread_w32.BUILD diff --git a/third_party/BUILD.qt b/third_party/qt.BUILD similarity index 100% rename from third_party/BUILD.qt rename to third_party/qt.BUILD diff --git a/third_party/qt/BUILD.qtbase.dev b/third_party/qt/qtbase.dev.BUILD similarity index 100% rename from third_party/qt/BUILD.qtbase.dev rename to third_party/qt/qtbase.dev.BUILD diff --git a/third_party/qt/BUILD.qtbase.out b/third_party/qt/qtbase.out.BUILD similarity index 100% rename from third_party/qt/BUILD.qtbase.out rename to third_party/qt/qtbase.out.BUILD diff --git a/third_party/qt/BUILD.qtsvg.dev b/third_party/qt/qtsvg.dev.BUILD similarity index 100% rename from third_party/qt/BUILD.qtsvg.dev rename to third_party/qt/qtsvg.dev.BUILD diff --git a/third_party/qt/BUILD.qtsvg.out b/third_party/qt/qtsvg.out.BUILD similarity index 100% rename from third_party/qt/BUILD.qtsvg.out rename to third_party/qt/qtsvg.out.BUILD diff --git a/third_party/BUILD.sdl2 b/third_party/sdl2.BUILD similarity index 100% rename from third_party/BUILD.sdl2 rename to third_party/sdl2.BUILD diff --git a/third_party/BUILD.sqlcipher b/third_party/sqlcipher.BUILD similarity index 100% rename from third_party/BUILD.sqlcipher rename to third_party/sqlcipher.BUILD diff --git a/third_party/BUILD.tcl b/third_party/tcl.BUILD similarity index 100% rename from third_party/BUILD.tcl rename to third_party/tcl.BUILD diff --git a/third_party/BUILD.typeshed b/third_party/typeshed.BUILD similarity index 100% rename from third_party/BUILD.typeshed rename to third_party/typeshed.BUILD diff --git a/third_party/BUILD.typing_extensions b/third_party/typing_extensions.BUILD similarity index 100% rename from third_party/BUILD.typing_extensions rename to third_party/typing_extensions.BUILD diff --git a/third_party/BUILD.x11 b/third_party/x11.BUILD similarity index 100% rename from third_party/BUILD.x11 rename to third_party/x11.BUILD diff --git a/third_party/BUILD.xcb b/third_party/xcb.BUILD similarity index 100% rename from third_party/BUILD.xcb rename to third_party/xcb.BUILD diff --git a/third_party/BUILD.xext b/third_party/xext.BUILD similarity index 100% rename from third_party/BUILD.xext rename to third_party/xext.BUILD diff --git a/third_party/BUILD.xproto b/third_party/xproto.BUILD similarity index 100% rename from third_party/BUILD.xproto rename to third_party/xproto.BUILD diff --git a/third_party/BUILD.xss b/third_party/xss.BUILD similarity index 100% rename from third_party/BUILD.xss rename to third_party/xss.BUILD diff --git a/third_party/BUILD.xxf86vm b/third_party/xxf86vm.BUILD similarity index 100% rename from third_party/BUILD.xxf86vm rename to third_party/xxf86vm.BUILD diff --git a/third_party/BUILD.yasm b/third_party/yasm.BUILD similarity index 100% rename from third_party/BUILD.yasm rename to third_party/yasm.BUILD diff --git a/tools/built/src/home/.config/home-manager/home.nix b/tools/built/src/home/.config/home-manager/home.nix index 2fc15c4f..689bc513 100644 --- a/tools/built/src/home/.config/home-manager/home.nix +++ b/tools/built/src/home/.config/home-manager/home.nix @@ -112,7 +112,7 @@ map Q gqap au BufEnter *.x,*.y set ts=8 sw=8 noexpandtab - au BufEnter BUILD.* set ft=bzl + au BufEnter BUILD.*,*.BUILD set ft=bzl au FileType sh,javascript set ts=2 sw=2 au FileType go set noexpandtab " .lhs files need a long distance sync for highlighting diff --git a/tools/built/src/home/.vimrc b/tools/built/src/home/.vimrc index b14934ac..a4b15f2f 100644 --- a/tools/built/src/home/.vimrc +++ b/tools/built/src/home/.vimrc @@ -44,7 +44,7 @@ au BufEnter *.h,*.cc,*.cpp :set syntax=cpp.doxygen au BufEnter *.c :set syntax=c.doxygen au BufEnter *.y,*.x :set noexpandtab tw=150 -au BufEnter BUILD.* :set ft=starlark +au BufEnter *.BUILD,BUILD.* :set ft=starlark au BufEnter *.hs,*.lhs :set autoindent nocindent smartindent diff --git a/tools/workspace/github.bzl b/tools/workspace/github.bzl index d1ef4796..7bd47f06 100644 --- a/tools/workspace/github.bzl +++ b/tools/workspace/github.bzl @@ -40,7 +40,7 @@ def github_archive(name, repo, version, is_release = False, strip_prefix = "", * def new_github_archive(name, **kwargs): """new_http_archive but for GitHub downloads.""" if "build_file" not in kwargs and "build_file_content" not in kwargs: - kwargs["build_file"] = "@toktok//third_party:BUILD.%s" % name + kwargs["build_file"] = "@toktok//third_party:%s.BUILD" % name github_archive( name = name, **kwargs diff --git a/tools/workspace/local.bzl b/tools/workspace/local.bzl index 6c06860d..2449d928 100644 --- a/tools/workspace/local.bzl +++ b/tools/workspace/local.bzl @@ -12,7 +12,7 @@ def _impl(repository_ctx): "BUILD", repository_ctx.read( repository_ctx.path( - Label("@toktok//third_party:BUILD." + name), + Label("@toktok//third_party:" + name + ".BUILD"), ), ), ) diff --git a/tools/workspace/qt.bzl b/tools/workspace/qt.bzl index 74c5b6dd..ed944b99 100644 --- a/tools/workspace/qt.bzl +++ b/tools/workspace/qt.bzl @@ -9,7 +9,7 @@ def _impl(repository_ctx): "BUILD", repository_ctx.read( repository_ctx.path( - Label("@toktok//third_party:BUILD.qt"), + Label("@toktok//third_party:qt.BUILD"), ), ), )