Merge pull request #41768 from flokli/iproute2mac
darwin.iproute2mac: init at 1.2.1
This commit is contained in:
commit
253d78142d
38
pkgs/os-specific/darwin/iproute2mac/default.nix
Normal file
38
pkgs/os-specific/darwin/iproute2mac/default.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, darwin, python }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
version = "1.2.1";
|
||||||
|
name = "iproute2mac-${version}";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "brona";
|
||||||
|
repo = "iproute2mac";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1n6la7blbxza2m79cpnywsavhzsdv4gzdxrkly4dppyidjg6jy1h";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ python ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace src/ip.py \
|
||||||
|
--replace /usr/bin/python ${python}/bin/python \
|
||||||
|
--replace /sbin/ifconfig ${darwin.network_cmds}/bin/ifconfig \
|
||||||
|
--replace /sbin/route ${darwin.network_cmds}/bin/route \
|
||||||
|
--replace /usr/sbin/netstat ${darwin.network_cmds}/bin/netstat \
|
||||||
|
--replace /usr/sbin/ndp ${darwin.network_cmds}/bin/ndp \
|
||||||
|
--replace /usr/sbin/arp ${darwin.network_cmds}/bin/arp \
|
||||||
|
--replace /usr/sbin/networksetup ${darwin.network_cmds}/bin/networksetup
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
install -D -m 755 src/ip.py $out/bin/ip
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://github.com/brona/iproute2mac;
|
||||||
|
description = "CLI wrapper for basic network utilites on Mac OS X inspired with iproute2 on Linux systems - ip command.";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ flokli ];
|
||||||
|
platforms = platforms.darwin;
|
||||||
|
};
|
||||||
|
}
|
@ -51,6 +51,8 @@ in
|
|||||||
inherit (pkgs.llvmPackages) clang-unwrapped;
|
inherit (pkgs.llvmPackages) clang-unwrapped;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
iproute2mac = callPackage ../os-specific/darwin/iproute2mac { };
|
||||||
|
|
||||||
libobjc = apple-source-releases.objc4;
|
libobjc = apple-source-releases.objc4;
|
||||||
|
|
||||||
lsusb = callPackage ../os-specific/darwin/lsusb { };
|
lsusb = callPackage ../os-specific/darwin/lsusb { };
|
||||||
|
Loading…
Reference in New Issue
Block a user