4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, makeWrapper, perlPackages }:
|
|
|
|
let
|
|
perlLibs = with perlPackages; [ NetDBus XMLTwig XMLParser ];
|
|
in
|
|
stdenv.mkDerivation {
|
|
pname = "hsphfpd";
|
|
version = "2020-12-05";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pali";
|
|
repo = "hsphfpd-prototype";
|
|
rev = "d294d064879591e9570ca3f444fa3eee2f269df8";
|
|
sha256 = "0pm5rbsfrm04hnifzdmsyz17rjk8h9h6d19jaikjc5y36z03xf1c";
|
|
};
|
|
|
|
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 lib; {
|
|
description = "Bluetooth HSP/HFP daemon";
|
|
homepage = "https://github.com/pali/hsphfpd-prototype";
|
|
license = licenses.artistic1;
|
|
maintainers = with maintainers; [ gebner ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|