|
14 | 14 | tomlplusplus, |
15 | 15 | ghc_filesystem, |
16 | 16 | libarchive, |
17 | | - darwin, |
18 | 17 | gamemode, |
19 | 18 | extra-cmake-modules, |
20 | | - nix-filter, |
21 | 19 | msaClientID ? null, |
22 | 20 | gamemodeSupport ? stdenv.hostPlatform.isLinux, |
23 | | -}: let |
24 | | - isDarwin = stdenv.hostPlatform.isDarwin; |
25 | | -in |
26 | | - assert lib.assertMsg (gamemodeSupport -> stdenv.hostPlatform.isLinux) |
27 | | - "gamemodeSupport only on linux"; |
28 | | - stdenv.mkDerivation { |
29 | | - pname = "freesmlauncher-unwrapped"; |
30 | | - version = self.shortRev or self.dirtyShortRev or "_git"; |
31 | | - src = nix-filter.lib { |
32 | | - root = self; |
33 | | - include = [ |
34 | | - "buildconfig" |
35 | | - "cmake" |
36 | | - "launcher" |
37 | | - "libraries" |
38 | | - "program_info" |
39 | | - "tests" |
40 | | - ../docs/COPYING.md |
41 | | - ../CMakeLists.txt |
42 | | - ]; |
| 21 | +}: |
| 22 | +assert lib.assertMsg (gamemodeSupport -> stdenv.hostPlatform.isLinux) |
| 23 | +"gamemodeSupport only on linux"; |
| 24 | + stdenv.mkDerivation { |
| 25 | + pname = "freesmlauncher-unwrapped"; |
| 26 | + version = self.shortRev or self.dirtyShortRev or "_git"; |
| 27 | + src = with lib.fileset; |
| 28 | + toSource { |
| 29 | + root = ../.; |
| 30 | + fileset = unions [ |
| 31 | + ../buildconfig |
| 32 | + ../cmake |
| 33 | + ../launcher |
| 34 | + ../libraries |
| 35 | + ../program_info |
| 36 | + ../tests |
43 | 37 |
|
44 | | - # Some fetchers leave submodules directories empty instead of omitting them, causing Garnix CI cache misses. |
45 | | - exclude = [ |
46 | | - "libraries/libnbtplusplus" |
| 38 | + ../CMakeLists.txt |
| 39 | + ../docs/COPYING.md |
47 | 40 | ]; |
48 | 41 | }; |
49 | 42 |
|
50 | | - postUnpack = '' |
51 | | - ln -s ${libnbtplusplus} source/libraries/libnbtplusplus |
52 | | - ''; |
| 43 | + postUnpack = let |
| 44 | + folder = "source/libraries/libnbtplusplus"; |
| 45 | + in '' |
| 46 | + rm -rf ${folder} |
| 47 | + ln -s ${libnbtplusplus} ${folder} |
| 48 | + ''; |
53 | 49 |
|
54 | | - nativeBuildInputs = [ |
55 | | - cmake |
56 | | - ninja |
57 | | - extra-cmake-modules |
58 | | - jdk17 |
59 | | - stripJavaArchivesHook |
60 | | - ]; |
| 50 | + nativeBuildInputs = [ |
| 51 | + cmake |
| 52 | + ninja |
| 53 | + extra-cmake-modules |
| 54 | + jdk17 |
| 55 | + stripJavaArchivesHook |
| 56 | + ]; |
61 | 57 |
|
62 | | - buildInputs = |
63 | | - [ |
64 | | - cmark |
65 | | - ghc_filesystem |
66 | | - kdePackages.qtbase |
67 | | - kdePackages.qtnetworkauth |
68 | | - kdePackages.quazip |
69 | | - libarchive |
70 | | - tomlplusplus |
71 | | - qrencode |
72 | | - zlib |
73 | | - ] |
74 | | - ++ lib.optionals isDarwin [darwin.apple_sdk.frameworks.Cocoa] |
75 | | - ++ lib.optionals gamemodeSupport [gamemode]; |
| 58 | + buildInputs = |
| 59 | + [ |
| 60 | + cmark |
| 61 | + ghc_filesystem |
| 62 | + kdePackages.qtbase |
| 63 | + kdePackages.qtnetworkauth |
| 64 | + kdePackages.quazip |
| 65 | + libarchive |
| 66 | + tomlplusplus |
| 67 | + qrencode |
| 68 | + zlib |
| 69 | + ] |
| 70 | + ++ lib.optionals gamemodeSupport [gamemode]; |
76 | 71 |
|
77 | | - cmakeFlags = |
78 | | - [(lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs")] |
79 | | - ++ lib.optionals (msaClientID != null) [ |
80 | | - (lib.cmakeFeature "Launcher_MSA_CLIENT_ID" msaClientID) |
81 | | - ] |
82 | | - ++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") |
83 | | - [ |
84 | | - (lib.cmakeFeature "Launcher_QT_VERSION_MAJOR" "5") |
85 | | - ] |
86 | | - ++ lib.optionals stdenv.hostPlatform.isDarwin [ |
87 | | - (lib.cmakeFeature "INSTALL_BUNDLE" "nodeps") |
88 | | - (lib.cmakeFeature "MACOSX_SPARKLE_UPDATE_FEED_URL" "''") |
89 | | - (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/Applications/") |
90 | | - ]; |
| 72 | + cmakeFlags = |
| 73 | + [(lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs")] |
| 74 | + ++ lib.optionals (msaClientID != null) [ |
| 75 | + (lib.cmakeFeature "Launcher_MSA_CLIENT_ID" msaClientID) |
| 76 | + ] |
| 77 | + ++ lib.optionals stdenv.hostPlatform.isDarwin [ |
| 78 | + (lib.cmakeFeature "INSTALL_BUNDLE" "nodeps") |
| 79 | + (lib.cmakeFeature "MACOSX_SPARKLE_UPDATE_FEED_URL" "''") |
| 80 | + (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/Applications/") |
| 81 | + ]; |
91 | 82 |
|
92 | | - doCheck = true; |
93 | | - dontWrapQtApps = true; |
94 | | - enableParallelBuilding = true; |
| 83 | + doCheck = true; |
| 84 | + dontWrapQtApps = true; |
| 85 | + enableParallelBuilding = true; |
95 | 86 |
|
96 | | - meta = { |
97 | | - description = "Prism Launcher fork aimed to provide a free way to play Minecraft"; |
98 | | - longDescription = '' |
99 | | - Freesm Launcher is a custom launcher for Minecraft that allows you |
100 | | - to easily manage multiple installations of Minecraft at once and login |
101 | | - with offline account without any restrictions. |
102 | | - ''; |
103 | | - homepage = "https://freesmlauncher.org/"; |
104 | | - license = lib.licenses.gpl3Only; |
105 | | - platforms = lib.platforms.linux ++ lib.platforms.darwin; |
106 | | - mainProgram = "freesmlauncher"; |
107 | | - maintainers = with lib.maintainers; [s0me1newithhand7s]; |
108 | | - }; |
109 | | - } |
| 87 | + meta = { |
| 88 | + description = "Prism Launcher fork aimed to provide a free way to play Minecraft"; |
| 89 | + longDescription = '' |
| 90 | + Freesm Launcher is a custom launcher for Minecraft that allows you |
| 91 | + to easily manage multiple installations of Minecraft at once and login |
| 92 | + with offline account without any restrictions. |
| 93 | + ''; |
| 94 | + homepage = "https://freesmlauncher.org/"; |
| 95 | + license = lib.licenses.gpl3Only; |
| 96 | + platforms = lib.platforms.linux ++ lib.platforms.darwin; |
| 97 | + mainProgram = "freesmlauncher"; |
| 98 | + maintainers = with lib.maintainers; [s0me1newithhand7s]; |
| 99 | + }; |
| 100 | + } |
0 commit comments