mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 11:13:30 +00:00
52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{ callPackage
|
|
, libsForQt5
|
|
}:
|
|
|
|
let
|
|
stableVersion = "2.2.34";
|
|
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 = [
|
|
(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)) { };
|
|
guiSrcHash = "sha256-1YsVMrUYI46lJZbPjf3jnOFDr9Hp54m8DVMz9y4dvVc=";
|
|
serverSrcHash = "sha256-h4d9s+QvqN/EFV97rPRhQiyC06wkZ9C2af9gx1Z/x/8=";
|
|
|
|
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;
|
|
};
|
|
}
|