earbuds: init at 0.1.9-unstable-2024-06-28
This commit is contained in:
parent
0d6cba9f65
commit
54d6c4b154
2534
pkgs/by-name/ea/earbuds/Cargo.lock
generated
Normal file
2534
pkgs/by-name/ea/earbuds/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
26
pkgs/by-name/ea/earbuds/fix-daemon.patch
Normal file
26
pkgs/by-name/ea/earbuds/fix-daemon.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 6f52bee7f71e253b0504164fc268750116945108 Mon Sep 17 00:00:00 2001
|
||||
From: griffi-gh <prasol258@gmail.com>
|
||||
Date: Mon, 4 Nov 2024 00:43:49 +0100
|
||||
Subject: [PATCH] fix daemon autostart
|
||||
|
||||
---
|
||||
src/daemon_utils.rs | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/daemon_utils.rs b/src/daemon_utils.rs
|
||||
index cd8f49b..f56e100 100644
|
||||
--- a/src/daemon_utils.rs
|
||||
+++ b/src/daemon_utils.rs
|
||||
@@ -13,7 +13,11 @@ use nix::{
|
||||
pub fn start() -> bool {
|
||||
let curr_exe = env::current_exe().expect("Couldn't get current executable!");
|
||||
let mut cmd = Command::new("nohup");
|
||||
- let cmd = cmd.arg(curr_exe).arg("-d").arg("--no-fork").arg("-q");
|
||||
+ let cmd = cmd
|
||||
+ .arg(curr_exe)
|
||||
+ .arg("--daemon").arg("true")
|
||||
+ .arg("--no-fork").arg("true")
|
||||
+ .arg("--quiet").arg("true");
|
||||
cmd.stdout(Stdio::null());
|
||||
cmd.stderr(Stdio::null());
|
||||
let status = cmd.spawn();
|
77
pkgs/by-name/ea/earbuds/package.nix
Normal file
77
pkgs/by-name/ea/earbuds/package.nix
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
nix-update-script,
|
||||
pkg-config,
|
||||
dbus,
|
||||
libpulseaudio,
|
||||
bluez,
|
||||
}:
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "earbuds";
|
||||
version = "0.1.9-unstable-2024-06-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JojiiOfficial";
|
||||
repo = "LiveBudsCli";
|
||||
rev = "df46706e44fa9e7de355b11eab4cc850efe968a3";
|
||||
hash = "sha256-IEor7aZnwCA6Rg2gXIYSQ65hV/jJOKehujOSZnVzVis=";
|
||||
};
|
||||
|
||||
# fix daemon autostart not working
|
||||
patches = [
|
||||
./fix-daemon.patch
|
||||
];
|
||||
|
||||
# git dependencies are currently not supported in the fixed-output derivation fetcher.
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"galaxy_buds_rs-0.2.10" = "sha256-95PBmGwHJiXi72Rir8KK7as+i9yjs5nf45SaBhj1geg=";
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
libpulseaudio
|
||||
bluez
|
||||
];
|
||||
|
||||
# package does not contain any tests
|
||||
doCheck = false;
|
||||
|
||||
# nativeInstallCheckInputs = [
|
||||
# versionCheckHook
|
||||
# ];
|
||||
# versionCheckProgramArg = [ "--version" ];
|
||||
# doInstallCheck = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd earbuds \
|
||||
--bash <($out/bin/earbuds --generate bash) \
|
||||
--fish <($out/bin/earbuds --generate fish) \
|
||||
--zsh <($out/bin/earbuds --generate zsh)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Free CLI tool to control your Galaxy Buds";
|
||||
homepage = "https://github.com/JojiiOfficial/LiveBudsCli";
|
||||
changelog = "https://github.com/JojiiOfficial/LiveBudsCli/releases";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ griffi-gh ];
|
||||
mainProgram = "earbuds";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user