nixpkgs/pkgs/servers/neard/default.nix
2024-08-30 18:25:39 +02:00

82 lines
1.5 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, autoreconfHook
, autoconf-archive
, gobject-introspection
, pkg-config
, wrapGAppsHook3
, glib
, dbus
, libnl
, python3Packages
}:
stdenv.mkDerivation {
pname = "neard";
version = "0.19-unstable-2024-07-02";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "linux-nfc";
repo = "neard";
rev = "a0a7d4d677800a39346f0c89d93d0fe43a95efad";
hash = "sha256-6BgX7cJwxX+1RX3wU+HY/PIBgzomzOKemnl0SDLJNro=";
};
postPatch = ''
patchShebangs test/*
'';
nativeBuildInputs = [
autoreconfHook
autoconf-archive
gobject-introspection
pkg-config
python3Packages.wrapPython
wrapGAppsHook3
];
dontWrapGApps = true;
configureFlags = [
"--enable-pie"
"--enable-test"
"--enable-tools"
"--with-sysconfdir=/etc"
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
"--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
];
buildInputs = [
dbus
glib
libnl
];
strictDeps = true;
enableParallelBuilding = true;
pythonPath = with python3Packages; [
pygobject3
dbus-python
];
doCheck = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
wrapPythonProgramsIn "$out/lib/neard" "$pythonPath"
'';
meta = with lib; {
description = "Near Field Communication manager";
homepage = "https://01.org/linux-nfc";
license = licenses.gpl2Only;
maintainers = [ ];
platforms = platforms.unix;
};
}