You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

server.nix 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. { stable, branch, version, sha256Hash }:
  2. { stdenv, python3, fetchFromGitHub }:
  3. let
  4. python = python3;
  5. in python.pkgs.buildPythonPackage {
  6. pname = "gns3-server";
  7. inherit version;
  8. src = fetchFromGitHub {
  9. owner = "GNS3";
  10. repo = "gns3-server";
  11. rev = "v${version}";
  12. sha256 = sha256Hash;
  13. };
  14. postPatch = ''
  15. # Only 2.x is problematic:
  16. sed -iE "s/prompt-toolkit==1.0.15/prompt-toolkit<2.0.0/" requirements.txt
  17. '';
  18. propagatedBuildInputs = with python.pkgs; [
  19. aiohttp-cors yarl aiohttp multidict setuptools
  20. jinja2 psutil zipstream raven jsonschema distro async_generator aiofiles
  21. (python.pkgs.callPackage ../../../development/python-modules/prompt_toolkit/1.nix {})
  22. ];
  23. # Requires network access
  24. doCheck = false;
  25. postInstall = ''
  26. rm $out/bin/gns3loopback # For Windows only
  27. '';
  28. meta = with stdenv.lib; {
  29. description = "Graphical Network Simulator 3 server (${branch} release)";
  30. longDescription = ''
  31. The GNS3 server manages emulators such as Dynamips, VirtualBox or
  32. Qemu/KVM. Clients like the GNS3 GUI control the server using a HTTP REST
  33. API.
  34. '';
  35. homepage = https://www.gns3.com/;
  36. license = licenses.gpl3Plus;
  37. platforms = platforms.linux;
  38. maintainers = with maintainers; [ primeos ];
  39. };
  40. }