1 { lib, stdenv, fetchFromGitHub, darwin, python3 }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-MaL8eb9UOZ71BL4Jvc6Od+EJ+F6j96n9a+vRnHeveIU=";
14 buildInputs = [ python3 ];
17 substituteInPlace src/ip.py \
18 --replace /sbin/ifconfig ${darwin.network_cmds}/bin/ifconfig \
19 --replace /sbin/route ${darwin.network_cmds}/bin/route \
20 --replace /usr/sbin/netstat ${darwin.network_cmds}/bin/netstat \
21 --replace /usr/sbin/ndp ${darwin.network_cmds}/bin/ndp \
22 --replace /usr/sbin/arp ${darwin.network_cmds}/bin/arp \
23 --replace /usr/sbin/networksetup ${darwin.network_cmds}/bin/networksetup
27 install -D -m 755 src/ip.py $out/bin/ip
31 homepage = "https://github.com/brona/iproute2mac";
32 description = "CLI wrapper for basic network utilites on Mac OS X inspired with iproute2 on Linux systems - ip command.";
33 license = licenses.mit;
34 maintainers = with maintainers; [ jiegec ];
35 platforms = platforms.darwin;