Skip to content

Commit

Permalink
iproute2mac: init at 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mrene committed Aug 22, 2024
1 parent 60bff23 commit fa20d8f
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions pkgs/iproute2mac/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ lib
, python3
, fetchFromGitHub
}:

python3.pkgs.buildPythonApplication rec {
pname = "iproute2mac";
version = "1.5.3";
pyproject = true;

src = fetchFromGitHub {
owner = "brona";
repo = "iproute2mac";
rev = "v${version}";
hash = "sha256-YtUTm/f0deLpSZzNrAnNfvhx46lae1V36EAY3l1aBQg=";
};

nativeBuildInputs = [
python3.pkgs.setuptools
python3.pkgs.wheel
];

pythonImportsCheck = [ "iproute2mac" ];

postInstall = ''
mkdir -p $out/bin
chmod +x $out/${python3.sitePackages}/ip.py
chmod +x $out/${python3.sitePackages}/bridge.py
cp -s $out/${python3.sitePackages}/ip.py $out/bin/ip
cp -s $out/${python3.sitePackages}/bridge.py $out/bin/bridge
'';

meta = with lib; {
description = "CLI wrapper for basic network utilites on Mac OS X inspired with iproute2 on Linux systems - ip command";
homepage = "https://github.com/brona/iproute2mac";
license = licenses.mit;
maintainers = with maintainers; [ mrene ];
mainProgram = "iproute2mac";
platforms = platforms.darwin;
};
}

0 comments on commit fa20d8f

Please sign in to comment.