Merge pull request #1485 from getchoo/nix-darwin
This commit is contained in:
commit
5c95448f1f
@ -25,8 +25,7 @@
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
# Disabled due to our packages not supporting darwin yet.
|
||||
# "x86_64-darwin"
|
||||
# "aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
mkPrism = qt:
|
||||
qt.callPackage ./package.nix {
|
||||
inherit (inputs) libnbtplusplus;
|
||||
inherit (prev.darwin.apple_sdk.frameworks) Cocoa;
|
||||
inherit self version;
|
||||
};
|
||||
in {
|
||||
|
@ -2,6 +2,8 @@
|
||||
lib,
|
||||
stdenv,
|
||||
cmake,
|
||||
cmark,
|
||||
Cocoa,
|
||||
ninja,
|
||||
jdk17,
|
||||
zlib,
|
||||
@ -9,15 +11,15 @@
|
||||
quazip,
|
||||
extra-cmake-modules,
|
||||
tomlplusplus,
|
||||
cmark,
|
||||
ghc_filesystem,
|
||||
gamemode,
|
||||
msaClientID ? null,
|
||||
gamemodeSupport ? true,
|
||||
gamemodeSupport ? stdenv.isLinux,
|
||||
self,
|
||||
version,
|
||||
libnbtplusplus,
|
||||
}:
|
||||
assert lib.assertMsg (stdenv.isLinux || !gamemodeSupport) "gamemodeSupport is only available on Linux";
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "prismlauncher-unwrapped";
|
||||
inherit version;
|
||||
@ -34,13 +36,18 @@ stdenv.mkDerivation rec {
|
||||
tomlplusplus
|
||||
cmark
|
||||
]
|
||||
++ lib.optional gamemodeSupport gamemode;
|
||||
++ lib.optional gamemodeSupport gamemode
|
||||
++ lib.optionals stdenv.isDarwin [Cocoa];
|
||||
|
||||
hardeningEnable = ["pie"];
|
||||
hardeningEnable = lib.optionals stdenv.isLinux ["pie"];
|
||||
|
||||
cmakeFlags =
|
||||
lib.optionals (msaClientID != null) ["-DLauncher_MSA_CLIENT_ID=${msaClientID}"]
|
||||
++ lib.optionals (lib.versionOlder qtbase.version "6") ["-DLauncher_QT_VERSION_MAJOR=5"];
|
||||
[
|
||||
"-DLauncher_BUILD_PLATFORM=nixpkgs"
|
||||
]
|
||||
++ lib.optionals (msaClientID != null) ["-DLauncher_MSA_CLIENT_ID=${msaClientID}"]
|
||||
++ lib.optionals (lib.versionOlder qtbase.version "6") ["-DLauncher_QT_VERSION_MAJOR=5"]
|
||||
++ lib.optionals stdenv.isDarwin ["-DINSTALL_BUNDLE=nodeps" "-DMACOSX_SPARKLE_UPDATE_FEED_URL=''"];
|
||||
|
||||
postUnpack = ''
|
||||
rm -rf source/libraries/libnbtplusplus
|
||||
@ -57,9 +64,9 @@ stdenv.mkDerivation rec {
|
||||
their own mods, texture packs, saves, etc) and helps you manage them and
|
||||
their associated options with a simple interface.
|
||||
'';
|
||||
platforms = platforms.linux;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${version}";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [minion3665 Scrumplex];
|
||||
maintainers = with maintainers; [minion3665 Scrumplex getchoo];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user