Merge pull request #177512 from hyqhyq3/master

libnfc: fix build on darwin
This commit is contained in:
Fabian Affolter 2022-06-13 23:22:21 +02:00 committed by GitHub
commit 5ac346bc2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,11 @@
{ lib, stdenv, fetchFromGitHub, libusb-compat-0_1, readline, cmake, pkg-config }:
{ lib
, stdenv
, fetchFromGitHub
, libusb-compat-0_1
, readline
, cmake
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "libnfc";
@ -11,16 +18,29 @@ stdenv.mkDerivation rec {
sha256 = "5gMv/HajPrUL/vkegEqHgN2d6Yzf01dTMrx4l34KMrQ=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libusb-compat-0_1 readline ];
nativeBuildInputs = [
cmake
pkg-config
];
configureFlags = [ "sysconfdir=/etc" ];
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; {
broken = stdenv.isDarwin;
description = "Open source library libnfc for Near Field Communication";
license = licenses.gpl3;
description = "Library for Near Field Communication (NFC)";
homepage = "https://github.com/nfc-tools/libnfc";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ offline ];
platforms = platforms.unix;
};