forked from FreesmTeam/FreesmLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunwrapped.nix
More file actions
101 lines (94 loc) · 2.53 KB
/
Copy pathunwrapped.nix
File metadata and controls
101 lines (94 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
lib,
self,
libnbtplusplus,
stdenv,
cmake,
ninja,
jdk17,
stripJavaArchivesHook,
kdePackages,
cmark,
qrencode,
zlib,
tomlplusplus,
ghc_filesystem,
libarchive,
gamemode,
pkg-config,
msaClientID ? null,
gamemodeSupport ? stdenv.hostPlatform.isLinux,
}:
assert lib.assertMsg (gamemodeSupport -> stdenv.hostPlatform.isLinux)
"gamemodeSupport only on linux";
stdenv.mkDerivation {
pname = "freesmlauncher-unwrapped";
version = self.shortRev or self.dirtyShortRev or "_git";
src = with lib.fileset;
toSource {
root = ../.;
fileset = unions [
../buildconfig
../cmake
../launcher
../libraries
../program_info
../tests
../CMakeLists.txt
../docs/COPYING.md
];
};
postUnpack = let
folder = "source/libraries/libnbtplusplus";
in ''
rm -rf ${folder}
ln -s ${libnbtplusplus} ${folder}
'';
nativeBuildInputs = [
cmake
ninja
kdePackages.extra-cmake-modules
jdk17
stripJavaArchivesHook
pkg-config
];
buildInputs =
[
cmark
ghc_filesystem
kdePackages.qtbase
kdePackages.qtnetworkauth
kdePackages.quazip
libarchive
tomlplusplus
qrencode
zlib
]
++ lib.optionals gamemodeSupport [gamemode];
cmakeFlags =
[(lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs")]
++ lib.optionals (msaClientID != null) [
(lib.cmakeFeature "Launcher_MSA_CLIENT_ID" msaClientID)
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(lib.cmakeFeature "INSTALL_BUNDLE" "nodeps")
(lib.cmakeFeature "MACOSX_SPARKLE_UPDATE_FEED_URL" "''")
(lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/Applications/")
];
doCheck = stdenv.hostPlatform.isLinux;
dontWrapQtApps = true;
enableParallelBuilding = true;
meta = {
description = "Prism Launcher fork aimed to provide a free way to play Minecraft";
longDescription = ''
Freesm Launcher is a custom launcher for Minecraft that allows you
to easily manage multiple installations of Minecraft at once and login
with offline account without any restrictions.
'';
homepage = "https://freesmlauncher.org/";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "freesmlauncher";
maintainers = with lib.maintainers; [s0me1newithhand7s];
};
}