10 stdenv.mkDerivation rec {
12 pname = "iproute2mac";
14 src = fetchFromGitHub {
18 hash = "sha256-hmSqJ2gc0DOXUuFrp1ZG8usjFdo07zjV/1JLs5r/E04=";
21 nativeBuildInputs = [ makeWrapper ];
23 buildInputs = [ python3 ];
26 substituteInPlace src/iproute2mac.py \
27 --replace-fail /sbin/ifconfig ${darwin.network_cmds}/bin/ifconfig \
28 --replace-fail /sbin/route ${darwin.network_cmds}/bin/route \
29 --replace-fail /usr/sbin/netstat ${darwin.network_cmds}/bin/netstat \
30 --replace-fail /usr/sbin/ndp ${darwin.network_cmds}/bin/ndp \
31 --replace-fail /usr/sbin/arp ${darwin.network_cmds}/bin/arp \
32 --replace-fail /usr/sbin/networksetup ${darwin.network_cmds}/bin/networksetup
38 mkdir -p $out/bin $out/libexec
39 install -D -m 755 src/iproute2mac.py $out/libexec/iproute2mac.py
40 install -D -m 755 src/ip.py $out/libexec/ip
41 install -D -m 755 src/bridge.py $out/libexec/bridge
42 makeWrapper $out/libexec/ip $out/bin/ip
43 makeWrapper $out/libexec/bridge $out/bin/bridge
49 homepage = "https://github.com/brona/iproute2mac";
50 description = "CLI wrapper for basic network utilites on Mac OS X inspired with iproute2 on Linux systems - ip command";
51 license = lib.licenses.mit;
52 maintainers = with lib.maintainers; [ jiegec ];
53 platforms = lib.platforms.darwin;