Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libnfc / default.nix
blob88bc909ea0e6f6789e944f047f4baaa575be2658
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , libusb-compat-0_1
5 , readline
6 , cmake
7 , pkg-config
8 }:
10 stdenv.mkDerivation rec {
11   pname = "libnfc";
12   version = "1.8.0";
14   src = fetchFromGitHub {
15     owner = "nfc-tools";
16     repo = pname;
17     rev = "libnfc-${version}";
18     sha256 = "5gMv/HajPrUL/vkegEqHgN2d6Yzf01dTMrx4l34KMrQ=";
19   };
21   nativeBuildInputs = [
22     cmake
23     pkg-config
24   ];
26   buildInputs = [
27     libusb-compat-0_1
28     readline
29   ];
31   configureFlags = [
32     "sysconfdir=/etc"
33   ];
35   cmakeFlags = lib.optionals stdenv.isDarwin [
36     "-DLIBNFC_DRIVER_PN532_I2C=OFF"
37     "-DLIBNFC_DRIVER_PN532_SPI=OFF"
38   ];
40   meta = with lib; {
41     description = "Library for Near Field Communication (NFC)";
42     homepage = "https://github.com/nfc-tools/libnfc";
43     license = licenses.lgpl3Plus;
44     maintainers = with maintainers; [ offline ];
45     platforms = platforms.unix;
46   };