nur: init client 335 and dbc/maps/camera/vmaps/mmaps
parent
64ec2ed17b
commit
276f807167
@ -0,0 +1,30 @@
|
|||||||
|
{ stdenv, requireFile, lib }:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "world-of-warcraft-client-en_US";
|
||||||
|
version = "3.3.5a-12340";
|
||||||
|
|
||||||
|
preferLocalBuild = true;
|
||||||
|
|
||||||
|
src = requireFile {
|
||||||
|
name = "WoW_335a_en_US";
|
||||||
|
url = "https://download.wowdl.net/downloadFiles/Clients/World-of-Warcraft-3.3.5a.12340-enUS.zip";
|
||||||
|
hash = "sha256-yBPxE/IXRh5nph8VSSwn1GnmjoGaNdI7PTpZ6ngE2H0=";
|
||||||
|
hashMode = "recursive";
|
||||||
|
};
|
||||||
|
|
||||||
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -rv . $out/
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
locale = "en-US";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "World Of Warcraft client for 3.3.5a";
|
||||||
|
maintainers = with maintainers; [ raitobezarius ];
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
{ wow_335a, trinitycore_335, callPackage, lib }:
|
||||||
|
let
|
||||||
|
extractors = callPackage ./generic.nix {
|
||||||
|
wowClient = wow_335a;
|
||||||
|
trinityCoreTools = trinitycore_335;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
dbc = extractors "dbc";
|
||||||
|
maps = extractors "map";
|
||||||
|
camera = extractors "camera";
|
||||||
|
vmaps = extractors "vmaps";
|
||||||
|
mmaps = extractors "mmaps";
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
{ wowClient, trinityCoreTools, stdenv, lib, symlinkJoin }:
|
||||||
|
let
|
||||||
|
extractor = assetVariant:
|
||||||
|
let
|
||||||
|
tool = {
|
||||||
|
"map" = "mapextractor";
|
||||||
|
"dbc" = "mapextractor";
|
||||||
|
"camera" = "mapextractor";
|
||||||
|
"vmaps" = "vmap4extractor";
|
||||||
|
"mmaps" = "mmaps_generator";
|
||||||
|
}.${assetVariant};
|
||||||
|
toolInvocation = {
|
||||||
|
"map" = "${tool} -i ${toString wowClient} -o $out -e 1";
|
||||||
|
"dbc" = "${tool} -i ${toString wowClient} -o $out -e 2";
|
||||||
|
"camera" = "${tool} -i ${toString wowClient} -o $out -e 4";
|
||||||
|
"vmaps" = "${tool}";
|
||||||
|
"mmaps" = "${tool}";
|
||||||
|
}.${assetVariant};
|
||||||
|
assembleInvocation = {
|
||||||
|
"vmaps" = "vmap4assembler Buildings $out/vmaps";
|
||||||
|
"mmaps" = "rm -rf $out/mmaps && mv mmaps $out/mmaps";
|
||||||
|
}.${assetVariant} or null;
|
||||||
|
targetDirectory = {
|
||||||
|
"map" = "maps";
|
||||||
|
"dbc" = "dbc";
|
||||||
|
"camera" = "Cameras";
|
||||||
|
"vmaps" = "vmaps";
|
||||||
|
"mmaps" = "mmaps";
|
||||||
|
}.${assetVariant};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "${assetVariant}-${wowClient.passthru.locale}";
|
||||||
|
version = wowClient.version;
|
||||||
|
|
||||||
|
src = if assetVariant == "mmaps"
|
||||||
|
then
|
||||||
|
symlinkJoin {
|
||||||
|
name = "${wowClient.name}-with-extracted-maps-and-vmaps-and-dbc";
|
||||||
|
paths = [
|
||||||
|
wowClient
|
||||||
|
(extractor "dbc")
|
||||||
|
(extractor "map")
|
||||||
|
(extractor "vmaps")
|
||||||
|
];
|
||||||
|
} else wowClient;
|
||||||
|
|
||||||
|
preferLocalBuild = assetVariant != "mmaps";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
trinityCoreTools
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
mkdir -p $out/${targetDirectory}
|
||||||
|
${toolInvocation}
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = lib.optionalString (assembleInvocation != null) ''
|
||||||
|
${assembleInvocation}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
extractor
|
Loading…
Reference in New Issue