summary refs log tree commit diff
path: root/pkgs/servers/pulseaudio/hsphfpd.nix
diff options
context:
space:
mode:
authorEdmund Wu <fangkazuto@gmail.com>2020-10-24 19:54:30 -0400
committerGabriel Ebner <gebner@gebner.org>2020-11-10 20:53:13 +0100
commit0f83b301aa78ced03010d11d84baf6a8805c495d (patch)
tree40c5d53d0c54730c17c0035158b809d1eb23ab5c /pkgs/servers/pulseaudio/hsphfpd.nix
parent0e4d0d95d03d581d4d94ec6a04f58293baaaa167 (diff)
downloadnixpkgs-0f83b301aa78ced03010d11d84baf6a8805c495d.tar
nixpkgs-0f83b301aa78ced03010d11d84baf6a8805c495d.tar.gz
nixpkgs-0f83b301aa78ced03010d11d84baf6a8805c495d.tar.bz2
nixpkgs-0f83b301aa78ced03010d11d84baf6a8805c495d.tar.lz
nixpkgs-0f83b301aa78ced03010d11d84baf6a8805c495d.tar.xz
nixpkgs-0f83b301aa78ced03010d11d84baf6a8805c495d.tar.zst
nixpkgs-0f83b301aa78ced03010d11d84baf6a8805c495d.zip
hsphfpd: init at 2020-10-25
Diffstat (limited to 'pkgs/servers/pulseaudio/hsphfpd.nix')
-rw-r--r--pkgs/servers/pulseaudio/hsphfpd.nix46
1 files changed, 46 insertions, 0 deletions
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;
+  };
+}