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:
parent
7d5785de2b
commit
e0b64413b0
|
@ -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)) { };
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue