aboutsummaryrefslogtreecommitdiff
path: root/nix/distribution.nix
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-26 01:57:23 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-01 17:03:11 -0700
commit671d3c1c80b7d6fbe8910a2070b156c25962b2c9 (patch)
treee36e0f2a227810fe1d6a4088509b42fb02dcd25b /nix/distribution.nix
parentdf18d8560dd4648d21cfdddb463e5e9770a822f7 (diff)
parentc523765c197cf63d6830d205f1554cd73e38109e (diff)
downloadPrismLauncher-671d3c1c80b7d6fbe8910a2070b156c25962b2c9.tar.gz
PrismLauncher-671d3c1c80b7d6fbe8910a2070b156c25962b2c9.tar.bz2
PrismLauncher-671d3c1c80b7d6fbe8910a2070b156c25962b2c9.zip
Merge branch 'develop' into chore/add-compiler-warnings
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'nix/distribution.nix')
-rw-r--r--nix/distribution.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nix/distribution.nix b/nix/distribution.nix
new file mode 100644
index 00000000..0f2e26f3
--- /dev/null
+++ b/nix/distribution.nix
@@ -0,0 +1,29 @@
+{
+ inputs,
+ self,
+ version,
+ ...
+}: {
+ perSystem = {pkgs, ...}: {
+ packages = {
+ inherit (pkgs) prismlauncher-qt5-unwrapped prismlauncher-qt5 prismlauncher-unwrapped prismlauncher;
+ default = pkgs.prismlauncher;
+ };
+ };
+
+ flake = {
+ overlays.default = final: prev: let
+ # Helper function to build prism against different versions of Qt.
+ mkPrism = qt:
+ qt.callPackage ./package.nix {
+ inherit (inputs) libnbtplusplus;
+ inherit self version;
+ };
+ in {
+ prismlauncher-qt5-unwrapped = mkPrism final.libsForQt5;
+ prismlauncher-qt5 = prev.prismlauncher-qt5.override {prismlauncher-unwrapped = final.prismlauncher-qt5-unwrapped;};
+ prismlauncher-unwrapped = mkPrism final.qt6Packages;
+ prismlauncher = prev.prismlauncher.override {inherit (final) prismlauncher-unwrapped;};
+ };
+ };
+}