2021-12-06 16:07:01 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, autoreconfHook
|
|
|
|
, autoconf-archive
|
|
|
|
, pkg-config
|
|
|
|
, systemd
|
|
|
|
, glib
|
|
|
|
, dbus
|
|
|
|
, libnl
|
|
|
|
, python2Packages
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "neard";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.18";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-05 21:33:18 +00:00
|
|
|
url = "https://git.kernel.org/pub/scm/network/nfc/neard.git/snapshot/neard-${version}.tar.gz";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "wBPjEVMV4uEdFrXw8cjOmvvNuiaACq2RJF/ZtKXck4s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +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-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-debug"
|
|
|
|
"--enable-tools"
|
|
|
|
"--enable-ese"
|
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -m 0755 tools/snep-send $out/bin/
|
|
|
|
|
|
|
|
install -D -m644 src/main.conf $out/etc/neard/main.conf
|
|
|
|
|
|
|
|
# INFO: the config option "--enable-test" would copy the apps to $out/lib/neard/test/ instead
|
|
|
|
install -d $out/lib/neard
|
|
|
|
install -m 0755 test/* $out/lib/neard/
|
|
|
|
wrapPythonProgramsIn $out/lib/neard "$out $pythonPath"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Near Field Communication manager";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://01.org/linux-nfc";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ jtojnar tstrobel ];
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|