2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libusb-compat-0_1
|
|
|
|
, readline
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libnfc";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nfc-tools";
|
|
|
|
repo = pname;
|
|
|
|
rev = "libnfc-${version}";
|
|
|
|
sha256 = "5gMv/HajPrUL/vkegEqHgN2d6Yzf01dTMrx4l34KMrQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildInputs = [
|
|
|
|
libusb-compat-0_1
|
|
|
|
readline
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"sysconfdir=/etc"
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals stdenv.isDarwin [
|
|
|
|
"-DLIBNFC_DRIVER_PN532_I2C=OFF"
|
|
|
|
"-DLIBNFC_DRIVER_PN532_SPI=OFF"
|
|
|
|
];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "Library for Near Field Communication (NFC)";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/nfc-tools/libnfc";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
2022-04-27 09:35:20 +00:00
|
|
|
maintainers = with maintainers; [ offline ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|