mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 05:33:23 +00:00
a2498f5ace
This will now properly wrap the gns3 binary using wrapQtApp instead of
unnecessarily adding qt5Full to the PATH (which significantly increases
the closure and often causes the build to break due to broken transitive
dependencies).
This supersedes the old approach from commit 0eaec4dee2
.
50 lines
1.5 KiB
Nix
50 lines
1.5 KiB
Nix
{ callPackage, libsForQt5 }:
|
|
|
|
let
|
|
stableVersion = "2.2.12";
|
|
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 = [
|
|
(mkOverride "psutil" "5.6.7"
|
|
"1an5llivfkwpbcfaapbx78p8sfnvzyfypf60wfxihib1mjr8xbgz")
|
|
(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)) { };
|
|
guiSrcHash = "05nnil8ljyj6h366yrniv6syznhhbnb7nzjkz5785rb9pzjizs19";
|
|
serverSrcHash = "0gmfdnymiw4w13qbcsvd71yj3hc9640n43c305vq39hahvsn7rvc";
|
|
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;
|
|
};
|
|
}
|