Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 62 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 cmake, 5 fetchgit, 6 libnl, 7 libubox, 8 uci, 9 ubus, 10 json_c, 11 pkg-config, 12 udebug, 13}: 14 15stdenv.mkDerivation { 16 pname = "netifd"; 17 version = "unstable-2023-11-27"; 18 19 src = fetchgit { 20 url = "https://git.openwrt.org/project/netifd.git"; 21 rev = "02bc2e14d1d37500e888c0c53ac41398a56b5579"; 22 hash = "sha256-aMs/Y50+1Yk/j5jGubjBCRcPGw03oIitvEygaxRlr90="; 23 }; 24 25 buildInputs = [ 26 libnl.dev 27 libubox 28 uci 29 ubus 30 json_c 31 udebug 32 ]; 33 34 nativeBuildInputs = [ 35 cmake 36 pkg-config 37 ]; 38 39 postPatch = '' 40 # by default this assumes the build directory is the source directory 41 # since we let cmake build in it's own build directory, we need to use 42 # $PWD (which at the time of this script being run is the directory with the source code) 43 # to adjust the paths 44 sed "s|./make_ethtool_modes_h.sh|$PWD/make_ethtool_modes_h.sh|g" -i CMakeLists.txt 45 sed "s|./ethtool-modes.h|$PWD/ethtool-modes.h|g" -i CMakeLists.txt 46 ''; 47 48 env.NIX_CFLAGS_COMPILE = toString ( 49 lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ 50 "-Wno-error=maybe-uninitialized" 51 ] 52 ); 53 54 meta = with lib; { 55 description = "OpenWrt Network interface configuration daemon"; 56 homepage = "https://git.openwrt.org/?p=project/netifd.git;a=summary"; 57 license = licenses.lgpl21Only; 58 platforms = platforms.linux; 59 maintainers = with maintainers; [ mkg20001 ]; 60 mainProgram = "netifd"; 61 }; 62}