Change the derivation to have parity with nixpkgs

- Symlink rather than copying libraries
- Update maintainers
- Reformat with nixpkgs-fmt

Signed-off-by: Skyler Grey <skyler3665@gmail.com>
This commit is contained in:
Skyler Grey 2022-10-19 23:16:42 +01:00
parent 41032aaac2
commit 513d93cfc7
No known key found for this signature in database
GPG Key ID: 1AFD10256B3C714D

View File

@ -59,20 +59,20 @@ stdenv.mkDerivation rec {
# Copy libnbtplusplus # Copy libnbtplusplus
rm -rf source/libraries/libnbtplusplus rm -rf source/libraries/libnbtplusplus
mkdir source/libraries/libnbtplusplus mkdir source/libraries/libnbtplusplus
cp -a ${libnbtplusplus}/* source/libraries/libnbtplusplus ln -s ${libnbtplusplus}/* source/libraries/libnbtplusplus
chmod a+r+w source/libraries/libnbtplusplus/* chmod -R +r+w source/libraries/libnbtplusplus
# Copy tomlplusplus # Copy tomlplusplus
rm -rf source/libraries/tomlplusplus rm -rf source/libraries/tomlplusplus
mkdir source/libraries/tomlplusplus mkdir source/libraries/tomlplusplus
cp -a ${tomlplusplus}/* source/libraries/tomlplusplus ln -s ${tomlplusplus}/* source/libraries/tomlplusplus
chmod a+r+w source/libraries/tomlplusplus/* chmod -R +r+w source/libraries/tomlplusplus
''; '';
cmakeFlags = [ cmakeFlags = [
"-GNinja" "-GNinja"
"-DLauncher_QT_VERSION_MAJOR=${lib.versions.major qtbase.version}" "-DLauncher_QT_VERSION_MAJOR=${lib.versions.major qtbase.version}"
] ++ lib.optionals enableLTO [ "-DENABLE_LTO=on" ] ] ++ lib.optionals enableLTO [ "-DENABLE_LTO=on" ]
++ lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]; ++ lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ];
# we have to check if the system is NixOS before adding stdenv.cc.cc.lib (#923) # we have to check if the system is NixOS before adding stdenv.cc.cc.lib (#923)
postInstall = '' postInstall = ''
@ -96,6 +96,6 @@ stdenv.mkDerivation rec {
''; '';
platforms = platforms.unix; platforms = platforms.unix;
license = licenses.gpl3Only; license = licenses.gpl3Only;
maintainers = with maintainers; [ starcraft66 kloenk ]; maintainers = with maintainers; [ minion3665 Scrumplex ];
}; };
} }