mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 01:24:47 +00:00
gns3-server,gns3-gui: 2.2.35.1 -> 2.2.42
This commit is contained in:
parent
67a16a0e60
commit
517c188a2c
@ -3,44 +3,34 @@
|
||||
}:
|
||||
|
||||
let
|
||||
stableVersion = "2.2.35.1";
|
||||
previewVersion = stableVersion;
|
||||
addVersion = args:
|
||||
let version = if args.stable then stableVersion else previewVersion;
|
||||
branch = if args.stable then "stable" else "preview";
|
||||
in args // { inherit version branch; };
|
||||
extraArgs = rec {
|
||||
mkOverride = attrname: version: sha256:
|
||||
self: super: {
|
||||
"${attrname}" = super."${attrname}".overridePythonAttrs (oldAttrs: {
|
||||
inherit version;
|
||||
src = oldAttrs.src.override {
|
||||
inherit version sha256;
|
||||
};
|
||||
});
|
||||
};
|
||||
mkGui = args: callPackage (import ./gui.nix (args)) {
|
||||
inherit (libsForQt5) wrapQtAppsHook;
|
||||
};
|
||||
mkGui = args: libsForQt5.callPackage (import ./gui.nix (addVersion args // extraArgs)) { };
|
||||
mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { };
|
||||
guiSrcHash = "sha256-iVvADwIp01HeZoDayvH1dilYRHRkRBTBR3Fh395JBq0=";
|
||||
serverSrcHash = "sha256-41dbiSjvmsDNYr9/rRkeQVOnPSVND34xx1SNknCgHfc=";
|
||||
|
||||
mkServer = args: callPackage (import ./server.nix (args)) { };
|
||||
in {
|
||||
|
||||
guiStable = mkGui {
|
||||
stable = true;
|
||||
sha256Hash = guiSrcHash;
|
||||
channel = "stable";
|
||||
version = "2.2.42";
|
||||
hash = "sha256-FW8Nuha+NrYVhR/66AiBpcCLHRhiLTW8KdHFyWSao84=";
|
||||
};
|
||||
|
||||
guiPreview = mkGui {
|
||||
stable = false;
|
||||
sha256Hash = guiSrcHash;
|
||||
channel = "stable";
|
||||
version = "2.2.42";
|
||||
hash = "sha256-FW8Nuha+NrYVhR/66AiBpcCLHRhiLTW8KdHFyWSao84=";
|
||||
};
|
||||
|
||||
serverStable = mkServer {
|
||||
stable = true;
|
||||
sha256Hash = serverSrcHash;
|
||||
channel = "stable";
|
||||
version = "2.2.42";
|
||||
hash = "sha256-YM07krEay2W+/6mKLAg+B7VEnAyDlkD+0+cSO1FAJzA=";
|
||||
};
|
||||
|
||||
serverPreview = mkServer {
|
||||
stable = false;
|
||||
sha256Hash = serverSrcHash;
|
||||
channel = "stable";
|
||||
version = "2.2.42";
|
||||
hash = "sha256-YM07krEay2W+/6mKLAg+B7VEnAyDlkD+0+cSO1FAJzA=";
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{ stable
|
||||
, branch
|
||||
{ channel
|
||||
, version
|
||||
, sha256Hash
|
||||
, mkOverride
|
||||
, hash
|
||||
}:
|
||||
|
||||
{ lib
|
||||
@ -11,18 +9,19 @@
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonPackage rec {
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "gns3-gui";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit hash;
|
||||
owner = "GNS3";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = sha256Hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
pythonRelaxDepsHook
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
@ -33,25 +32,24 @@ python3.pkgs.buildPythonPackage rec {
|
||||
sentry-sdk
|
||||
setuptools
|
||||
sip_4 (pyqt5.override { withWebSockets = true; })
|
||||
truststore
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"jsonschema"
|
||||
"sentry-sdk"
|
||||
];
|
||||
|
||||
doCheck = false; # Failing
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
postFixup = ''
|
||||
wrapQtApp "$out/bin/gns3"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "psutil==" "psutil>=" \
|
||||
--replace "jsonschema>=4.17.0,<4.18" "jsonschema" \
|
||||
--replace "sentry-sdk==1.10.1,<1.11" "sentry-sdk"
|
||||
preFixup = ''
|
||||
wrapQtApp "$out/bin/gns3"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Graphical Network Simulator 3 GUI (${branch} release)";
|
||||
description = "Graphical Network Simulator 3 GUI (${channel} release)";
|
||||
longDescription = ''
|
||||
Graphical user interface for controlling the GNS3 network simulator. This
|
||||
requires access to a local or remote GNS3 server (it's recommended to
|
||||
|
@ -1,13 +1,12 @@
|
||||
{ stable
|
||||
, branch
|
||||
{ channel
|
||||
, version
|
||||
, sha256Hash
|
||||
, mkOverride
|
||||
, hash
|
||||
}:
|
||||
|
||||
{ lib
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, pkgsStatic
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication {
|
||||
@ -15,23 +14,25 @@ python3.pkgs.buildPythonApplication {
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit hash;
|
||||
owner = "GNS3";
|
||||
repo = "gns3-server";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = sha256Hash;
|
||||
};
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"aiofiles"
|
||||
"jsonschema"
|
||||
"psutil"
|
||||
"sentry-sdk"
|
||||
];
|
||||
# GNS3 2.3.26 requires a static BusyBox for the Docker integration
|
||||
prePatch = ''
|
||||
cp ${pkgsStatic.busybox}/bin/busybox gns3server/compute/docker/resources/bin/busybox
|
||||
'';
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"jsonschema"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
aiofiles
|
||||
aiohttp
|
||||
@ -47,6 +48,7 @@ python3.pkgs.buildPythonApplication {
|
||||
py-cpuinfo
|
||||
sentry-sdk
|
||||
setuptools
|
||||
truststore
|
||||
yarl
|
||||
zipstream
|
||||
];
|
||||
@ -59,7 +61,7 @@ python3.pkgs.buildPythonApplication {
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Graphical Network Simulator 3 server (${branch} release)";
|
||||
description = "Graphical Network Simulator 3 server (${channel} release)";
|
||||
longDescription = ''
|
||||
The GNS3 server manages emulators such as Dynamips, VirtualBox or
|
||||
Qemu/KVM. Clients like the GNS3 GUI control the server using a HTTP REST
|
||||
|
Loading…
Reference in New Issue
Block a user