PrismLauncher/nix/distribution.nix
seth 89e434bd5b
refactor(nix): don't concat final attr in fixed point
Signed-off-by: seth <getchoo@tuta.io>
2023-09-09 15:25:33 -04:00

50 lines
1.2 KiB
Nix

{
inputs,
self,
...
}: {
perSystem = {
lib,
pkgs,
...
}: {
packages = let
ourPackages = lib.fix (final: self.overlays.default final pkgs);
in {
inherit
(ourPackages)
prismlauncher-qt5-unwrapped
prismlauncher-qt5
prismlauncher-unwrapped
prismlauncher
;
default = ourPackages.prismlauncher;
};
};
flake = {
overlays.default = final: prev: let
version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
# common args for prismlauncher evaluations
unwrappedArgs = {
inherit (inputs) libnbtplusplus;
inherit ((final.darwin or prev.darwin).apple_sdk.frameworks) Cocoa;
inherit self version;
};
in {
prismlauncher-qt5-unwrapped = prev.libsForQt5.callPackage ./pkg unwrappedArgs;
prismlauncher-qt5 = prev.libsForQt5.callPackage ./pkg/wrapper.nix {
prismlauncher-unwrapped = final.prismlauncher-qt5-unwrapped;
};
prismlauncher-unwrapped = prev.qt6Packages.callPackage ./pkg unwrappedArgs;
prismlauncher = prev.qt6Packages.callPackage ./pkg/wrapper.nix {
inherit (final) prismlauncher-unwrapped;
};
};
};
}