19 pyEnv = python3.withPackages (ps: [
25 telnet = runCommand "inetutils-telnet" { } ''
27 ln -s "${inetutils}"/bin/telnet "$out/bin"
30 generatedPath = lib.makeSearchPath "bin" [
35 # mn errors out without a telnet binary
36 # pkgs.inetutils brings an undesired ifconfig into PATH see #43105
42 stdenv.mkDerivation rec {
51 src = fetchFromGitHub {
55 hash = "sha256-Z7Vbfu0EJ4+rCpckXrt3hgxeB9N2nnyPIXgPBnpV4uw=";
58 buildFlags = [ "mnexec" ];
59 makeFlags = [ "PREFIX=$(out)" ];
61 pythonPath = [ python3.pkgs.setuptools ];
65 python3.pkgs.wrapPython
68 propagatedBuildInputs = [
80 # without --root, install fails
81 "${pyEnv.interpreter}" setup.py install \
84 --install-scripts="$out/bin"
88 wrapPythonProgramsIn "$out/bin" "$py $pythonPath"
89 wrapProgram "$out/bin/mnexec" \
90 --prefix PATH : "${generatedPath}"
91 wrapProgram "$out/bin/mn" \
92 --prefix PATH : "${generatedPath}"
98 description = "Emulator for rapid prototyping of Software Defined Networks";
99 license = licenses.bsd3;
100 platforms = platforms.linux;
101 homepage = "https://github.com/mininet/mininet";
102 maintainers = with maintainers; [ teto ];
103 mainProgram = "mnexec";