1{ stdenv, lib, fetchgit, cmake, pkg-config }:
2
3stdenv.mkDerivation {
4 pname = "libnl-tiny";
5 version = "unstable-2023-07-27";
6
7 src = fetchgit {
8 url = "https://git.openwrt.org/project/libnl-tiny.git";
9 rev = "bc92a280186f9becc53c0f17e4e43cfbdeec7e7b";
10 hash = "sha256-/d6so8hfBOyp8NbUhPZ0aRj6gXO/RLgwCQnAT7N/rF8=";
11 };
12
13 nativeBuildInputs = [ cmake pkg-config ];
14
15 preConfigure = ''
16 sed -e 's|''${prefix}/@CMAKE_INSTALL_LIBDIR@|@CMAKE_INSTALL_FULL_LIBDIR@|g' \
17 -e 's|''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@|@CMAKE_INSTALL_FULL_INCLUDEDIR@|g' \
18 -i libnl-tiny.pc.in
19 '';
20
21 meta = with lib; {
22 description = "Tiny OpenWrt fork of libnl";
23 homepage = "https://git.openwrt.org/?p=project/libnl-tiny.git;a=summary";
24 license = licenses.isc;
25 maintainers = with maintainers; [ mkg20001 ];
26 platforms = platforms.all;
27 };
28}