2018-11-22 00:33:10 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
|
|
|
, which
|
|
|
|
, python
|
|
|
|
, help2man
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pyEnv = python.withPackages(ps: [ ps.setuptools ]);
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-05 10:55:06 +02:00
|
|
|
pname = "mininet";
|
|
|
|
version = "2.3.0d6";
|
2018-11-22 00:33:10 +01:00
|
|
|
|
|
|
|
outputs = [ "out" "py" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mininet";
|
|
|
|
repo = "mininet";
|
|
|
|
rev = version;
|
2019-08-05 10:55:06 +02:00
|
|
|
sha256 = "0wc6gni9dxj9jjnw66a28jdvcfm8bxv1i776m5dh002bn5wjcl6x";
|
2018-11-22 00:33:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildFlags = [ "mnexec" ];
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
pythonPath = [ python.pkgs.setuptools ];
|
|
|
|
buildInputs = [ python which help2man ];
|
|
|
|
|
|
|
|
installTargets = [ "install-mnexec" "install-manpages" ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out $py
|
|
|
|
# without --root, install fails
|
|
|
|
${pyEnv.interpreter} setup.py install --root="/" --prefix=$py
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Emulator for rapid prototyping of Software Defined Networks";
|
|
|
|
license = {
|
2019-08-05 10:55:06 +02:00
|
|
|
fullName = "Mininet 2.3.0d6 License";
|
2018-11-22 00:33:10 +01:00
|
|
|
};
|
2019-08-05 10:55:06 +02:00
|
|
|
platforms = platforms.linux;
|
2018-11-22 00:33:10 +01:00
|
|
|
homepage = https://github.com/mininet/mininet;
|
|
|
|
maintainers = with maintainers; [ teto ];
|
|
|
|
};
|
|
|
|
}
|