2021-11-22 14:14:24 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, autoreconfHook
|
|
|
|
, autoconf-archive
|
|
|
|
, pkg-config
|
|
|
|
, systemd
|
|
|
|
, glib
|
|
|
|
, dbus
|
|
|
|
, libnl
|
|
|
|
, python2Packages
|
|
|
|
}:
|
2015-09-29 14:24:20 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-25 21:53:02 +00:00
|
|
|
pname = "neard";
|
2021-11-22 14:14:24 +00:00
|
|
|
version = "0.18";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
2015-09-29 14:24:20 +00:00
|
|
|
|
2017-12-05 22:05:21 +00:00
|
|
|
src = fetchurl {
|
2021-07-25 21:53:02 +00:00
|
|
|
url = "https://git.kernel.org/pub/scm/network/nfc/neard.git/snapshot/neard-${version}.tar.gz";
|
2021-11-22 14:14:24 +00:00
|
|
|
sha256 = "wBPjEVMV4uEdFrXw8cjOmvvNuiaACq2RJF/ZtKXck4s=";
|
2015-09-29 14:24:20 +00:00
|
|
|
};
|
|
|
|
|
2021-11-22 14:14:24 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
autoconf-archive
|
|
|
|
pkg-config
|
|
|
|
python2Packages.wrapPython
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
systemd
|
|
|
|
glib
|
|
|
|
dbus
|
|
|
|
libnl
|
|
|
|
] ++ (with python2Packages; [
|
|
|
|
python
|
|
|
|
]);
|
|
|
|
|
|
|
|
pythonPath = with python2Packages; [
|
|
|
|
pygobject2
|
|
|
|
dbus-python
|
|
|
|
pygtk
|
|
|
|
];
|
2021-07-27 18:20:18 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
2015-09-29 14:24:20 +00:00
|
|
|
|
2021-11-22 14:14:24 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-debug"
|
|
|
|
"--enable-tools"
|
|
|
|
"--enable-ese"
|
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
|
|
|
];
|
2015-09-29 14:24:20 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2015-09-30 14:08:32 +00:00
|
|
|
install -m 0755 tools/snep-send $out/bin/
|
|
|
|
|
2015-09-29 14:24:20 +00:00
|
|
|
install -D -m644 src/main.conf $out/etc/neard/main.conf
|
2015-09-30 14:08:32 +00:00
|
|
|
|
2015-10-01 12:23:22 +00:00
|
|
|
# INFO: the config option "--enable-test" would copy the apps to $out/lib/neard/test/ instead
|
2015-09-30 14:08:32 +00:00
|
|
|
install -d $out/lib/neard
|
|
|
|
install -m 0755 test/* $out/lib/neard/
|
|
|
|
wrapPythonProgramsIn $out/lib/neard "$out $pythonPath"
|
2015-09-29 14:24:20 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-09-29 14:24:20 +00:00
|
|
|
description = "Near Field Communication manager";
|
2021-11-22 14:14:24 +00:00
|
|
|
homepage = "https://01.org/linux-nfc";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ jtojnar tstrobel ];
|
|
|
|
platforms = platforms.unix;
|
2015-09-29 14:24:20 +00:00
|
|
|
};
|
|
|
|
}
|