2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, systemd, glib, dbus, libnl, pythonPackages }:
|
2015-09-29 15:24:20 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-12-05 22:05:21 +00:00
|
|
|
name = "neard-0.16";
|
2015-09-29 15:24:20 +01:00
|
|
|
|
2017-12-05 22:05:21 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://git.kernel.org/pub/scm/network/nfc/neard.git/snapshot/${name}.tar.gz";
|
|
|
|
sha256 = "0bpdmyxvd3z54p95apz4bjb5jp8hbc04sicjapcryjwa8mh6pbil";
|
2015-09-29 15:24:20 +01:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2017-09-05 22:26:13 +01:00
|
|
|
buildInputs = [ systemd glib dbus libnl pythonPackages.python pythonPackages.wrapPython ];
|
2016-09-11 22:24:51 +01:00
|
|
|
pythonPath = [ pythonPackages.pygobject2 pythonPackages.dbus-python pythonPackages.pygtk ];
|
2015-09-29 15:24:20 +01:00
|
|
|
|
2015-10-01 13:23:22 +01:00
|
|
|
configureFlags = [ "--disable-debug" "--enable-tools" "--enable-ese" "--with-systemdsystemunitdir=$out/lib/systemd/system" ];
|
2015-09-29 15:24:20 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2015-09-30 15:08:32 +01:00
|
|
|
install -m 0755 tools/snep-send $out/bin/
|
|
|
|
|
2015-09-29 15:24:20 +01:00
|
|
|
install -D -m644 src/neard.service $out/lib/systemd/system/neard.service
|
|
|
|
install -D -m644 src/main.conf $out/etc/neard/main.conf
|
2015-09-30 15:08:32 +01:00
|
|
|
|
2015-10-01 13:23:22 +01:00
|
|
|
# INFO: the config option "--enable-test" would copy the apps to $out/lib/neard/test/ instead
|
2015-09-30 15:08:32 +01:00
|
|
|
install -d $out/lib/neard
|
|
|
|
install -m 0755 test/* $out/lib/neard/
|
|
|
|
wrapPythonProgramsIn $out/lib/neard "$out $pythonPath"
|
2015-09-29 15:24:20 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-09-29 15:24:20 +01:00
|
|
|
description = "Near Field Communication manager";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://01.org/linux-nfc";
|
2015-09-29 15:24:20 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ tstrobel ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|