mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
[Backport release-26.05] adw-bluetooth: 1.0.0 -> 1.1.0, init NixOS module (#536710)
This commit is contained in:
commit
72d6518236
4 changed files with 60 additions and 5 deletions
|
|
@ -78,6 +78,8 @@
|
|||
|
||||
- [ImmichFrame](https://immichframe.dev/), display your photos from Immich as a digital photo frame. Available as [services.immichframe](#opt-services.immichframe.enable).
|
||||
|
||||
- [adw-bluetooth](https://github.com/ezratweaver/adw-bluetooth), a GNOME-inspired LibAdwaita Bluetooth applet. Available as [services.adw-bluetooth](#opt-services.adw-bluetooth.enable).
|
||||
|
||||
- [PdfDing](https://www.pdfding.com/), manage, view and edit your PDFs seamlessly on all your devices wherever you are. Available as [services.pdfding](#opt-services.pdfding.enable).
|
||||
|
||||
- [mangowc](https://github.com/DreamMaoMao/mangowc), a lightweight and feature-rich Wayland compositor based on dwl. Available as [programs.mangowc](#opt-programs.mangowc.enable).
|
||||
|
|
|
|||
|
|
@ -558,6 +558,7 @@
|
|||
./services/databases/victoriametrics.nix
|
||||
./services/databases/victoriatraces.nix
|
||||
./services/desktops/accountsservice.nix
|
||||
./services/desktops/adw-bluetooth.nix
|
||||
./services/desktops/ayatana-indicators.nix
|
||||
./services/desktops/bamf.nix
|
||||
./services/desktops/blueman.nix
|
||||
|
|
|
|||
34
nixos/modules/services/desktops/adw-bluetooth.nix
Normal file
34
nixos/modules/services/desktops/adw-bluetooth.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.adw-bluetooth;
|
||||
in
|
||||
{
|
||||
meta.maintainers = with lib.maintainers; [ ezratweaver ];
|
||||
|
||||
options.services.adw-bluetooth = {
|
||||
enable = lib.mkEnableOption "Adwaita Bluetooth daemon";
|
||||
package = lib.mkPackageOption pkgs "adw-bluetooth" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
services.dbus.packages = [ cfg.package ];
|
||||
|
||||
systemd.user.services.adw-bluetooth-daemon = {
|
||||
description = "AdwBluetooth Daemon";
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [ "bluetooth.target" ];
|
||||
serviceConfig = {
|
||||
Type = "dbus";
|
||||
BusName = "com.ezratweaver.AdwBluetoothDaemon";
|
||||
ExecStart = "${cfg.package}/libexec/adw-bluetooth-daemon";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
|
|
@ -13,17 +14,27 @@
|
|||
libadwaita,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "adw-bluetooth";
|
||||
version = "1.0.0";
|
||||
let
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ezratweaver";
|
||||
repo = "adw-bluetooth";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-/KJpB9i6tFDnB3C0tPtJtt8tTDfNftIkHmP1JSVSZNY=";
|
||||
tag = version;
|
||||
hash = "sha256-h3cHtecwBsx3j33qXVn/zaq4FZext71P7flzunCHqHg=";
|
||||
};
|
||||
|
||||
daemon = buildGoModule {
|
||||
pname = "adw-bluetooth-daemon";
|
||||
inherit version;
|
||||
src = src + "/daemon";
|
||||
vendorHash = "sha256-7tiSwNhq6e4LEh4lUkfh2i4tEdWWL6TxQpYYwYKsfog=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "adw-bluetooth";
|
||||
inherit version src;
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
|
|
@ -39,6 +50,13 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
libadwaita
|
||||
];
|
||||
|
||||
mesonFlags = [ "-Dbuild_daemon=false" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/libexec
|
||||
ln -s ${daemon}/bin/daemon $out/libexec/adw-bluetooth-daemon
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "GNOME Inspired LibAdwaita Bluetooth Applet";
|
||||
homepage = "https://github.com/ezratweaver/adw-bluetooth";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue