···11+{
22+ cmake,
33+ doxygen,
44+ fetchFromGitHub,
55+ getopt,
66+ ninja,
77+ lib,
88+ pkg-config,
99+ stdenv,
1010+}:
1111+stdenv.mkDerivation rec {
1212+ pname = "ktx-tools";
1313+ version = "4.3.2";
1414+1515+ src = fetchFromGitHub {
1616+ owner = "KhronosGroup";
1717+ repo = "KTX-Software";
1818+ rev = "v${version}";
1919+ hash = "sha256-zjiJ8B8FEZUJ3iFTYXRmuIEtcaCWtBIbYwz0DwjTDFo";
2020+ };
2121+2222+ nativeBuildInputs = [
2323+ cmake
2424+ doxygen
2525+ getopt
2626+ ninja
2727+ pkg-config
2828+ ];
2929+3030+ cmakeBuildType = "RelWithDebInfo";
3131+3232+ cmakeFlags = [ "-DKTX_FEATURE_DOC=ON" ];
3333+3434+ postPatch = ''
3535+ patchShebangs .
3636+ '';
3737+3838+ meta = with lib; {
3939+ description = "KTX (Khronos Texture) Library and Tools";
4040+ longDescription = ''
4141+ KTX (Khronos Texture) is a lightweight container for textures for OpenGL®,
4242+ Vulkan® and other GPU APIs. KTX files contain all the parameters needed
4343+ for texture loading. A single file can contain anything from a simple
4444+ base-level 2D texture through to a cubemap array texture with mipmaps.
4545+4646+ This software package contains:
4747+ - libktx: a small library of functions for writing and reading KTX
4848+ files, and instantiating OpenGL®, OpenGL ES™️ and Vulkan® textures
4949+ from them.
5050+ - ktx2check: a tool for validating KTX Version 2 format files.
5151+ - ktx2ktx2: a tool for converting a KTX Version 1 file to a KTX Version
5252+ 2 file.
5353+ - ktxinfo: a tool to display information about a KTX file in human
5454+ readable form.
5555+ - ktxsc: a tool to supercompress a KTX Version 2 file that contains
5656+ uncompressed images.
5757+ - toktx: a tool to create KTX files from PNG, Netpbm or JPEG format
5858+ images. It supports mipmap generation, encoding to Basis Universal
5959+ formats and Zstd supercompression.
6060+ '';
6161+ homepage = "https://github.com/KhronosGroup/KTX-Software";
6262+ license = licenses.asl20;
6363+ maintainers = with maintainers; [ bonsairobo ];
6464+ platforms = platforms.linux;
6565+ };
6666+}