From 679309d85d89d7797a0b8a9500e0d04521fb2f8d Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Thu, 4 Sep 2025 08:31:16 +0100 Subject: [PATCH] brush-splat: init at 0.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: GaƩtan Lepage --- pkgs/by-name/br/brush-splat/package.nix | 78 +++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 pkgs/by-name/br/brush-splat/package.nix diff --git a/pkgs/by-name/br/brush-splat/package.nix b/pkgs/by-name/br/brush-splat/package.nix new file mode 100644 index 000000000000..452c72360efe --- /dev/null +++ b/pkgs/by-name/br/brush-splat/package.nix @@ -0,0 +1,78 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + bzip2, + libxkbcommon, + sqlite, + vulkan-loader, + zstd, + stdenv, + wayland, + nix-update-script, + versionCheckHook, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "brush-splat"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "ArthurBrussee"; + repo = "brush"; + tag = finalAttrs.version; + hash = "sha256-IvsHYCM/M2hHozzKwovgXpcW1b7MSEGneU62y1k8U9U="; + }; + + cargoHash = "sha256-7cJj5L8ggkBP9SDaYMtY9xIAHVAhi8cTD/0pncUaHbI="; + + # Force linking to libEGL, which is always dlopen()ed, and to + # libwayland-client & libxkbcommon, which is dlopen()ed based on the + # winit backend. + NIX_LDFLAGS = [ + "--no-as-needed" + "-lvulkan" + "-lwayland-client" + "-lxkbcommon" + ]; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + bzip2 + libxkbcommon + sqlite + vulkan-loader + zstd + ] + ++ lib.optionals stdenv.isLinux [ + wayland + ]; + + env = { + ZSTD_SYS_USE_PKG_CONFIG = true; + }; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "3D Reconstruction for all"; + homepage = "https://github.com/ArthurBrussee/brush"; + changelog = "https://github.com/ArthurBrussee/brush/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.asl20; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ matthewcroughan ]; + mainProgram = "brush_app"; + }; +})