4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
37 lines
1.4 KiB
Nix
37 lines
1.4 KiB
Nix
{ lib, stdenv, fetchurl, autoreconfHook, pkgconfig, systemd, glib, dbus, libnl, pythonPackages }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "neard-0.16";
|
|
|
|
src = fetchurl {
|
|
url = "https://git.kernel.org/pub/scm/network/nfc/neard.git/snapshot/${name}.tar.gz";
|
|
sha256 = "0bpdmyxvd3z54p95apz4bjb5jp8hbc04sicjapcryjwa8mh6pbil";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
buildInputs = [ systemd glib dbus libnl pythonPackages.python pythonPackages.wrapPython ];
|
|
pythonPath = [ pythonPackages.pygobject2 pythonPackages.dbus-python pythonPackages.pygtk ];
|
|
|
|
configureFlags = [ "--disable-debug" "--enable-tools" "--enable-ese" "--with-systemdsystemunitdir=$out/lib/systemd/system" ];
|
|
|
|
postInstall = ''
|
|
install -m 0755 tools/snep-send $out/bin/
|
|
|
|
install -D -m644 src/neard.service $out/lib/systemd/system/neard.service
|
|
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"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Near Field Communication manager";
|
|
homepage = "https://01.org/linux-nfc";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ tstrobel ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|