mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
496705197e
Switched to Python 3.
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{ stdenv, lib, fetchFromGitHub
|
|
, which
|
|
, python3
|
|
, help2man
|
|
}:
|
|
|
|
let
|
|
pyEnv = python3.withPackages(ps: [ ps.setuptools ]);
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "mininet";
|
|
version = "2.3.1b4";
|
|
|
|
outputs = [ "out" "py" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mininet";
|
|
repo = "mininet";
|
|
rev = version;
|
|
hash = "sha256-Z7Vbfu0EJ4+rCpckXrt3hgxeB9N2nnyPIXgPBnpV4uw=";
|
|
};
|
|
|
|
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 = licenses.bsd3;
|
|
platforms = platforms.linux;
|
|
homepage = "https://github.com/mininet/mininet";
|
|
maintainers = with maintainers; [ teto ];
|
|
mainProgram = "mnexec";
|
|
};
|
|
}
|