mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 11:44:07 +00:00
32 lines
842 B
Nix
32 lines
842 B
Nix
{ stdenv, fetchFromGitHub, 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
|
|
'';
|
|
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;
|
|
};
|
|
}
|