1 { stdenv, lib, fetchFromGitHub
16 pyEnv = python3.withPackages(ps: [
22 telnet = runCommand "inetutils-telnet"
26 ln -s "${inetutils}"/bin/telnet "$out/bin"
29 generatedPath = lib.makeSearchPath "bin" [
34 # mn errors out without a telnet binary
35 # pkgs.inetutils brings an undesired ifconfig into PATH see #43105
41 stdenv.mkDerivation rec {
45 outputs = [ "out" "py" ];
47 src = fetchFromGitHub {
51 hash = "sha256-Z7Vbfu0EJ4+rCpckXrt3hgxeB9N2nnyPIXgPBnpV4uw=";
54 buildFlags = [ "mnexec" ];
55 makeFlags = [ "PREFIX=$(out)" ];
57 pythonPath = [ python3.pkgs.setuptools ];
58 nativeBuildInputs = [ help2man makeWrapper python3.pkgs.wrapPython ];
60 propagatedBuildInputs = [ pyEnv which ];
62 installTargets = [ "install-mnexec" "install-manpages" ];
66 # without --root, install fails
67 "${pyEnv.interpreter}" setup.py install \
70 --install-scripts="$out/bin"
74 wrapPythonProgramsIn "$out/bin" "$py $pythonPath"
75 wrapProgram "$out/bin/mnexec" \
76 --prefix PATH : "${generatedPath}"
77 wrapProgram "$out/bin/mn" \
78 --prefix PATH : "${generatedPath}"
85 description = "Emulator for rapid prototyping of Software Defined Networks";
86 license = licenses.bsd3;
87 platforms = platforms.linux;
88 homepage = "https://github.com/mininet/mininet";
89 maintainers = with maintainers; [ teto ];
90 mainProgram = "mnexec";