summary refs log tree commit diff
path: root/pkgs/tools/virtualization
diff options
context:
space:
mode:
authorMatthieu Coudron <coudron@iij.ad.jp>2018-11-22 08:33:10 +0900
committerJörg Thalheim <Mic92@users.noreply.github.com>2018-11-21 23:33:10 +0000
commit35f74c36082027f6d02b9a0f907865e333cb47bb (patch)
tree6e39f13ab173e9cfe44b0ee19bf9e65933386d72 /pkgs/tools/virtualization
parent494e290dce6fbc39e33df1daa655dd025914013c (diff)
downloadnixpkgs-35f74c36082027f6d02b9a0f907865e333cb47bb.tar
nixpkgs-35f74c36082027f6d02b9a0f907865e333cb47bb.tar.gz
nixpkgs-35f74c36082027f6d02b9a0f907865e333cb47bb.tar.bz2
nixpkgs-35f74c36082027f6d02b9a0f907865e333cb47bb.tar.lz
nixpkgs-35f74c36082027f6d02b9a0f907865e333cb47bb.tar.xz
nixpkgs-35f74c36082027f6d02b9a0f907865e333cb47bb.tar.zst
nixpkgs-35f74c36082027f6d02b9a0f907865e333cb47bb.zip
mininet: init at 2.3.0d4 (#41261)
Mininet (https://github.com/mininet/mininet) is a popular network emulator that
glues several components such as network namespaces, traffic control
commands into a set of python bindings. It is then "easy" to describe a
topology and run experiments on it.
Diffstat (limited to 'pkgs/tools/virtualization')
-rw-r--r--pkgs/tools/virtualization/mininet/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/tools/virtualization/mininet/default.nix b/pkgs/tools/virtualization/mininet/default.nix
new file mode 100644
index 00000000000..a2f4b165087
--- /dev/null
+++ b/pkgs/tools/virtualization/mininet/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, lib, fetchFromGitHub
+, which
+, python
+, help2man
+}:
+
+let
+  pyEnv = python.withPackages(ps: [ ps.setuptools ]);
+in
+stdenv.mkDerivation rec {
+  name = "mininet-${version}";
+  version = "2.3.0d4";
+
+  outputs = [ "out" "py" ];
+
+  src = fetchFromGitHub {
+    owner = "mininet";
+    repo = "mininet";
+    rev = version;
+    sha256 = "02hsqa7r5ykj8m1ycl32xwn1agjrw78wkq87xif0dl2vkzln41i4";
+  };
+
+  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 = {
+      fullName = "Mininet 2.3.0d4 License";
+    };
+    homepage = https://github.com/mininet/mininet;
+    maintainers = with maintainers; [ teto ];
+  };
+}