2022-05-18 14:49:53 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, CoreServices }:
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libbtbb";
|
|
|
|
version = "2020-12-R1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greatscottgadgets";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1byv8174xam7siakr1p0523x97wkh0fmwmq341sd3g70qr2g767d";
|
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.isDarwin [ CoreServices ];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/greatscottgadgets/libbtbb/issues/63
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace lib/libbtbb.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
'';
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Bluetooth baseband decoding library";
|
|
|
|
homepage = "https://github.com/greatscottgadgets/libbtbb";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ oxzi ];
|
|
|
|
};
|
|
|
|
}
|