Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libbtbb / default.nix
blobe0e70005e25f5202dd25aee2c01d15c5353d170d
1 { stdenv, lib, fetchFromGitHub, cmake, CoreServices }:
3 stdenv.mkDerivation rec {
4   pname = "libbtbb";
5   version = "2020-12-R1";
7   src = fetchFromGitHub {
8     owner = "greatscottgadgets";
9     repo = pname;
10     rev = version;
11     sha256 = "1byv8174xam7siakr1p0523x97wkh0fmwmq341sd3g70qr2g767d";
12   };
14   nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.isDarwin [ CoreServices ];
16   # https://github.com/greatscottgadgets/libbtbb/issues/63
17   postPatch = ''
18     substituteInPlace lib/libbtbb.pc.in \
19       --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
20       --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
21   '';
23   meta = with lib; {
24     description = "Bluetooth baseband decoding library";
25     homepage = "https://github.com/greatscottgadgets/libbtbb";
26     license = licenses.gpl2;
27     maintainers = with maintainers; [ oxzi ];
28   };