blob: ccc79d36c8f624fa0d8fcb220cdaadeb4f458ca0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{ stdenv, lib, fetchFromGitHub
, which
, python3
, help2man
}:
let
pyEnv = python3.withPackages(ps: [ ps.setuptools ]);
in
stdenv.mkDerivation rec {
pname = "mininet";
version = "2.3.0";
outputs = [ "out" "py" ];
src = fetchFromGitHub {
owner = "mininet";
repo = "mininet";
rev = version;
sha256 = "sha256-bCppmeB+zQMKTptnzhsXtl72XJXU3USo7cQgP1Z6SrY=";
};
buildFlags = [ "mnexec" ];
makeFlags = [ "PREFIX=$(out)" ];
pythonPath = [ python3.pkgs.setuptools ];
nativeBuildInputs = [ help2man ];
propagatedBuildInputs = [ python3 which ];
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.0 License";
};
platforms = platforms.linux;
homepage = "https://github.com/mininet/mininet";
maintainers = with maintainers; [ teto ];
};
}
|