1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

gns3-server,gns3-gui: clean

This commit is contained in:
Anthony Roussel 2022-11-10 23:42:31 +01:00
parent 7d5785de2b
commit e0b64413b0
No known key found for this signature in database
GPG key ID: 9DC4987B1A55E75E
3 changed files with 5 additions and 30 deletions

View file

@ -12,18 +12,13 @@ let
extraArgs = rec {
mkOverride = attrname: version: sha256:
self: super: {
${attrname} = super.${attrname}.overridePythonAttrs (oldAttrs: {
"${attrname}" = super."${attrname}".overridePythonAttrs (oldAttrs: {
inherit version;
src = oldAttrs.src.override {
inherit version sha256;
};
});
};
commonOverrides = [
(self: super: {
jsonschema = super.jsonschema_3;
})
];
};
mkGui = args: libsForQt5.callPackage (import ./gui.nix (addVersion args // extraArgs)) { };
mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { };

View file

@ -3,25 +3,15 @@
, version
, sha256Hash
, mkOverride
, commonOverrides
}:
{ lib
, python3
, fetchFromGitHub
, wrapQtAppsHook
, packageOverrides ? self: super: {}
}:
let
defaultOverrides = commonOverrides ++ [
];
python = python3.override {
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([ packageOverrides ] ++ defaultOverrides);
};
in python.pkgs.buildPythonPackage rec {
python3.pkgs.buildPythonPackage rec {
pname = "gns3-gui";
inherit version;
@ -36,7 +26,7 @@ in python.pkgs.buildPythonPackage rec {
wrapQtAppsHook
];
propagatedBuildInputs = with python.pkgs; [
propagatedBuildInputs = with python3.pkgs; [
distro
jsonschema
psutil

View file

@ -3,24 +3,14 @@
, version
, sha256Hash
, mkOverride
, commonOverrides
}:
{ lib
, python3
, fetchFromGitHub
, packageOverrides ? self: super: {}
}:
let
defaultOverrides = commonOverrides ++ [
];
python = python3.override {
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([ packageOverrides ] ++ defaultOverrides);
};
in python.pkgs.buildPythonApplication {
python3.pkgs.buildPythonApplication {
pname = "gns3-server";
inherit version;
@ -37,7 +27,7 @@ in python.pkgs.buildPythonApplication {
--replace "jsonschema>=4.17.0,<4.18" "jsonschema"
'';
propagatedBuildInputs = with python.pkgs; [
propagatedBuildInputs = with python3.pkgs; [
aiofiles
aiohttp
aiohttp-cors