depot/third_party/nixpkgs/pkgs/development/libraries/libnfc/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

47 lines
873 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, libusb-compat-0_1
, readline
, cmake
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "libnfc";
version = "1.8.0";
src = fetchFromGitHub {
owner = "nfc-tools";
repo = pname;
rev = "libnfc-${version}";
sha256 = "5gMv/HajPrUL/vkegEqHgN2d6Yzf01dTMrx4l34KMrQ=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
libusb-compat-0_1
readline
];
configureFlags = [
"sysconfdir=/etc"
];
cmakeFlags = lib.optionals stdenv.isDarwin [
"-DLIBNFC_DRIVER_PN532_I2C=OFF"
"-DLIBNFC_DRIVER_PN532_SPI=OFF"
];
meta = with lib; {
description = "Library for Near Field Communication (NFC)";
homepage = "https://github.com/nfc-tools/libnfc";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ offline ];
platforms = platforms.unix;
};
}