From 0f83b301aa78ced03010d11d84baf6a8805c495d Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sat, 24 Oct 2020 19:54:30 -0400 Subject: [PATCH] hsphfpd: init at 2020-10-25 --- pkgs/servers/pulseaudio/hsphfpd.nix | 46 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 pkgs/servers/pulseaudio/hsphfpd.nix diff --git a/pkgs/servers/pulseaudio/hsphfpd.nix b/pkgs/servers/pulseaudio/hsphfpd.nix new file mode 100644 index 00000000000..8c1bea86aca --- /dev/null +++ b/pkgs/servers/pulseaudio/hsphfpd.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchFromGitHub, makeWrapper, perlPackages }: + +let + perlLibs = with perlPackages; [ NetDBus XMLTwig XMLParser ]; +in +stdenv.mkDerivation { + pname = "hsphfpd"; + version = "2020-10-25"; + + src = fetchFromGitHub { + owner = "pali"; + repo = "hsphfpd-prototype"; + rev = "601bf8f7bf2da97257aa6f786ec4cbb69b0ecbc8"; + sha256 = "06hh0xmp143334x8dg5nmp5727g38q2m5kqsvlrfia6vw2hcq0v0"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ perlPackages.perl ]; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/dbus-1/system.d + cp org.hsphfpd.conf $out/share/dbus-1/system.d + + mkdir -p $out/bin + cp *.pl $out/bin + + runHook postInstall + ''; + + postFixup = '' + for f in $out/bin/*.pl; do + wrapProgram "$f" --set PERL5LIB "${perlPackages.makePerlPath perlLibs}" + done + ''; + + meta = with stdenv.lib; { + description = "Bluetooth HSP/HFP daemon"; + homepage = "https://github.com/pali/hsphfpd-prototype"; + license = licenses.artistic1; + maintainers = with maintainers; [ gebner ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 679f69ea3e0..db9992d4b75 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16995,6 +16995,8 @@ in # PulseAudio daemons + hsphfpd = callPackage ../servers/pulseaudio/hsphfpd.nix { }; + pulseaudio-hsphfpd = callPackage ../servers/pulseaudio/pali.nix { inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit Cocoa; };