Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, libusb-compat-0_1 5, readline 6, cmake 7, pkg-config 8}: 9 10stdenv.mkDerivation rec { 11 pname = "libnfc"; 12 version = "1.8.0"; 13 14 src = fetchFromGitHub { 15 owner = "nfc-tools"; 16 repo = pname; 17 rev = "libnfc-${version}"; 18 sha256 = "5gMv/HajPrUL/vkegEqHgN2d6Yzf01dTMrx4l34KMrQ="; 19 }; 20 21 nativeBuildInputs = [ 22 cmake 23 pkg-config 24 ]; 25 26 buildInputs = [ 27 libusb-compat-0_1 28 readline 29 ]; 30 31 configureFlags = [ 32 "sysconfdir=/etc" 33 ]; 34 35 cmakeFlags = lib.optionals stdenv.isDarwin [ 36 "-DLIBNFC_DRIVER_PN532_I2C=OFF" 37 "-DLIBNFC_DRIVER_PN532_SPI=OFF" 38 ]; 39 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 }; 47}