{ lib, stdenv, fetchFromGitHub, cmake, qt6, fmt, vtflib-strata }: stdenv.mkDerivation rec { pname = "vtex2"; version = "0.3.1"; src = fetchFromGitHub { owner = "StrataSource"; repo = pname; rev = "v${version}"; fetchSubmodules = false; hash = "sha256-u5Tnz4zrOr04jUXYyD4trYne4QiaX40SZM7FAn/kkCk="; }; 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} ''; postFixup = '' wrapQtApp $out/bin/vtfview ''; meta = { homepage = src.url; description = "VTF converter and editor"; license = lib.licenses.mit; platforms = lib.platforms.unix; }; }