diff options
author | yuuko <yuuko@partyvan.io> | 2024-12-15 09:59:43 -0800 |
---|---|---|
committer | yuuko <yuuko@partyvan.io> | 2024-12-15 09:59:43 -0800 |
commit | 8f812e3aecc6b4645372ca997cd3f968796b6851 (patch) | |
tree | 2aa36cdd7f8204c3938465d9b00f29b24bea6f24 /srcds-pkgs/vtex2.nix | |
parent | 0a08e401d26785638c09ce378c282924e3ddbaf9 (diff) |
pkgs: enable vtex2 gui, let strata's vtflib actually build as a library
Diffstat (limited to 'srcds-pkgs/vtex2.nix')
-rw-r--r-- | srcds-pkgs/vtex2.nix | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/srcds-pkgs/vtex2.nix b/srcds-pkgs/vtex2.nix index bbc16d5..73ef48b 100644 --- a/srcds-pkgs/vtex2.nix +++ b/srcds-pkgs/vtex2.nix @@ -1,38 +1,41 @@ -{ lib, stdenv, fetchFromGitHub, cmake, compressonator-sdk }: -let - cmplibs = "CMP_Compressonator" + lib.optionalString (!stdenv.isAarch64) - " CMP_Core CMP_Core_SSE CMP_Core_AVX CMP_Core_AVX512"; -in +{ lib, stdenv, fetchFromGitHub, cmake, qt6, fmt, vtflib-strata }: stdenv.mkDerivation rec { pname = "vtex2"; - version = "0.2.0"; - + version = "0.3.1"; + src = fetchFromGitHub { owner = "StrataSource"; repo = pname; rev = "v${version}"; - fetchSubmodules = true; - hash = "sha256-LcrRGOOYJB2d/NhlfK5jFXcLNwVA0hcrX7zEquna3LA="; + fetchSubmodules = false; + hash = "sha256-u5Tnz4zrOr04jUXYyD4trYne4QiaX40SZM7FAn/kkCk="; }; - - cmakeFlags = [ "-DBUILD_GUI=OFF" ]; - - postPatch = '' - sed -E -i 's/_?stricmp/strcasecmp/g' \ - external/vtflib/VTFLib/VMT{Wrapper,GroupNode}.cpp - - sed -i 's/--no-undefined/-undefined,error/' \ - external/vtflib/CMakeLists.txt - sed -i 's/CMP_Compressonator/${cmplibs}/' \ - external/vtflib/CMakeLists.txt - cp ${compressonator-sdk}/lib/libCMP_*.a \ - external/vtflib/thirdparty/lib/x64/ - cp ${compressonator-sdk}/include/compressonator.h \ - external/vtflib/thirdparty/include/Compressonator.h + + cmakeFlags = [ "-DBUILD_GUI=ON" ]; + nativeBuildInputs = [ cmake qt6.wrapQtAppsHook ]; + buildInputs = with qt6; [ qtbase qtsvg qtwayland ]; + dontWrapQtApps = true; + + postUnpack = '' + rm -rf source/external/{fmt,vtf}lib + cp -r ${fmt.src} source/external/fmtlib + cp -r ${vtflib-strata.src} source/external/vtflib + chmod -R +w source + ''; + + preConfigure = '' + pwd + ls -l + ''; + + postInstall = '' + rm -rf $out/{include,lib} ''; - nativeBuildInputs = [ cmake ]; - + postFixup = '' + wrapQtApp $out/bin/vtfview + ''; + meta = { homepage = src.url; description = "VTF converter and editor"; |