From 1efb07b27cd463cd2d192a48a0d11fc11175d611 Mon Sep 17 00:00:00 2001 From: ToasterUwU Date: Mon, 6 Apr 2026 18:51:00 +0200 Subject: [PATCH] buttplug-lite: init at 2.5.5 --- pkgs/by-name/bu/buttplug-lite/package.nix | 87 +++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 pkgs/by-name/bu/buttplug-lite/package.nix diff --git a/pkgs/by-name/bu/buttplug-lite/package.nix b/pkgs/by-name/bu/buttplug-lite/package.nix new file mode 100644 index 000000000000..c6a8389b78e2 --- /dev/null +++ b/pkgs/by-name/bu/buttplug-lite/package.nix @@ -0,0 +1,87 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + makeDesktopItem, + versionCheckHook, + pkg-config, + git, + makeWrapper, + copyDesktopItems, + libx11, + libGL, + libxcb, + libxkbcommon, + dbus, + udev, + openssl, + wayland, + stdenv, +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "buttplug-lite"; + version = "2.5.5"; + + src = fetchFromGitHub { + owner = "runtime-shady-backroom"; + repo = "buttplug-lite"; + tag = finalAttrs.version; + hash = "sha256-Z7xf+507rTWWygPV4p0+Q3e2rFIVgn1Ktu/W1P0FOfw="; + }; + + cargoHash = "sha256-XGfHJAlv1B+tFKhLqMWiUaVyCUnyuyVZmYz3wvwITQI="; + + desktopItems = [ + (makeDesktopItem { + name = "buttplug-lite"; + exec = "buttplug-lite"; + desktopName = "Buttplug Lite"; + comment = "Simplified buttplug.io API for when JSON is infeasible"; + }) + ]; + + nativeBuildInputs = [ + pkg-config + git + makeWrapper + copyDesktopItems + ]; + + buildInputs = [ + libx11 + libGL + libxcb + libxkbcommon + dbus + openssl + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + udev + wayland + ]; + + postInstall = '' + wrapProgram $out/bin/buttplug-lite --suffix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath ( + [ + libx11 + libGL + libxcb + libxkbcommon + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland ] + ) + } + ''; + + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + + meta = { + description = "Simplified buttplug.io API for when JSON is infeasible"; + homepage = "https://github.com/runtime-shady-backroom/buttplug-lite"; + changelog = "https://github.com/runtime-shady-backroom/buttplug-lite/releases/tag/${finalAttrs.version}"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ toasteruwu ]; + }; +})