nixpkgs/pkgs/applications/networking/gns3/default.nix

50 lines
1.5 KiB
Nix
Raw Normal View History

{ callPackage, libsForQt5 }:
let
2020-12-06 11:16:17 +00:00
stableVersion = "2.2.17";
2019-11-15 21:17:47 +00:00
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;
};
});
};
commonOverrides = [
2020-08-08 12:27:20 +00:00
(mkOverride "psutil" "5.6.7"
"1an5llivfkwpbcfaapbx78p8sfnvzyfypf60wfxihib1mjr8xbgz")
2020-07-12 17:16:40 +00:00
(mkOverride "jsonschema" "3.2.0"
"0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68")
];
};
mkGui = args: libsForQt5.callPackage (import ./gui.nix (addVersion args // extraArgs)) { };
mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { };
2020-12-06 11:16:17 +00:00
guiSrcHash = "0dfyxr983w6lmbcvaf32bnm9cz7y7fp9jfaz8zxp1dvr6dr06cmv";
serverSrcHash = "0m5ajd2zkafx89hvp202m351h1dygfc3jssl3m7nd7r42csyi2vj";
in {
guiStable = mkGui {
stable = true;
sha256Hash = guiSrcHash;
};
guiPreview = mkGui {
stable = false;
sha256Hash = guiSrcHash;
};
serverStable = mkServer {
stable = true;
sha256Hash = serverSrcHash;
};
serverPreview = mkServer {
stable = false;
sha256Hash = serverSrcHash;
};
}