2022-04-27 09:35:20 +00:00
|
|
|
{ callPackage
|
|
|
|
, libsForQt5
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2022-04-27 09:35:20 +00:00
|
|
|
stableVersion = "2.2.31";
|
2020-04-24 23:36:52 +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 = [
|
2022-09-30 11:47:45 +00:00
|
|
|
(self: super: {
|
|
|
|
jsonschema = super.jsonschema_3;
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
mkGui = args: libsForQt5.callPackage (import ./gui.nix (addVersion args // extraArgs)) { };
|
2020-04-24 23:36:52 +00:00
|
|
|
mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { };
|
2022-04-27 09:35:20 +00:00
|
|
|
guiSrcHash = "sha256-o9j/avuapiUKIDO6aO/uWFF/5gu+xdfhL7ZSDSaQ858=";
|
|
|
|
serverSrcHash = "sha256-8r8nWNqbHUDtJ6x+/SxHxaw1isSuWF/5as3YXLB6LFw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|