Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 autoreconfHook,
6 autoconf-archive,
7 gobject-introspection,
8 pkg-config,
9 wrapGAppsHook3,
10 glib,
11 dbus,
12 libnl,
13 python3Packages,
14}:
15
16stdenv.mkDerivation {
17 pname = "neard";
18 version = "0.19-unstable-2024-07-02";
19
20 outputs = [
21 "out"
22 "dev"
23 ];
24
25 src = fetchFromGitHub {
26 owner = "linux-nfc";
27 repo = "neard";
28 rev = "a0a7d4d677800a39346f0c89d93d0fe43a95efad";
29 hash = "sha256-6BgX7cJwxX+1RX3wU+HY/PIBgzomzOKemnl0SDLJNro=";
30 };
31
32 postPatch = ''
33 patchShebangs test/*
34 '';
35
36 nativeBuildInputs = [
37 autoreconfHook
38 autoconf-archive
39 gobject-introspection
40 pkg-config
41 python3Packages.wrapPython
42 wrapGAppsHook3
43 ];
44
45 dontWrapGApps = true;
46
47 configureFlags = [
48 "--enable-pie"
49 "--enable-test"
50 "--enable-tools"
51 "--with-sysconfdir=/etc"
52 "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
53 "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
54 ];
55
56 buildInputs = [
57 dbus
58 glib
59 libnl
60 ];
61
62 strictDeps = true;
63
64 enableParallelBuilding = true;
65
66 pythonPath = with python3Packages; [
67 pygobject3
68 dbus-python
69 ];
70
71 doCheck = true;
72
73 preFixup = ''
74 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
75 wrapPythonProgramsIn "$out/lib/neard" "$pythonPath"
76 '';
77
78 meta = with lib; {
79 description = "Near Field Communication manager";
80 homepage = "https://01.org/linux-nfc";
81 license = licenses.gpl2Only;
82 maintainers = [ ];
83 platforms = platforms.unix;
84 };
85}