571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
48 lines
886 B
Nix
48 lines
886 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.hostPlatform.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;
|
|
};
|
|
}
|