nixpkgs/pkgs/tools/networking/netifd/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

29 lines
874 B
Nix

{ runCommand, lib, stdenv, cmake, fetchgit, libnl, libubox, uci, ubus, json_c }:
stdenv.mkDerivation {
pname = "netifd";
version = "unstable-2020-07-11";
src = fetchgit {
url = "https://git.openwrt.org/project/netifd.git";
rev = "3d9bd73e8c2d8a1f78effbe92dd2495bbd2552c4";
sha256 = "085sx1gsigbi1jr19l387rc5p6ja1np6q2gb84khjd4pyiqwk840";
};
buildInputs = [ libnl libubox uci ubus json_c ];
nativeBuildInputs = [ cmake ];
preBuild = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE \
-I$(echo "${stdenv.lib.getDev libnl}"/include/libnl*/)"
'';
meta = with lib; {
description = "OpenWrt Network interface configuration daemon";
homepage = "https://git.openwrt.org/?p=project/netifd.git;a=summary";
license = licenses.lgpl21;
platforms = platforms.linux;
maintainers = with maintainers; [ petabyteboy ];
};
}