Skip to content

Commit

Permalink
ktx-tools: init at 4.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsairobo committed Nov 12, 2023
1 parent 782e4f6 commit 694cbb9
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2468,6 +2468,12 @@
githubId = 50839;
name = "Brian Jones";
};
bonsairobo = {
name = "Duncan Fairbanks";
email = "duncanfairbanks6@gmail.com";
github = "bonsairobo";
githubId = 3229981;
};
booklearner = {
name = "booklearner";
email = "booklearner@proton.me";
Expand Down
68 changes: 68 additions & 0 deletions pkgs/by-name/kt/ktx-tools/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
cmake,
doxygen,
fetchFromGitHub,
getopt,
ninja,
lib,
pkg-config,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "ktx-tools";
version = "4.2.1";

src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "KTX-Software";
rev = "v${version}";
sha256 = "sha256-P44N2ff+3xBwQ3waAIY2c6uANZC4hSdQdSAzyNaBGbs=";
};

nativeBuildInputs = [
cmake
doxygen
getopt
ninja
pkg-config
];

cmakeBuildType = "RelWithDebInfo";

cmakeFlags = [
"-DKTX_FEATURE_DOC=ON"
];

postPatch = ''
patchShebangs .
'';

meta = with lib; {
description = "KTX (Khronos Texture) Library and Tools";
longDescription = ''
KTX (Khronos Texture) is a lightweight container for textures for OpenGL®,
Vulkan® and other GPU APIs. KTX files contain all the parameters needed
for texture loading. A single file can contain anything from a simple
base-level 2D texture through to a cubemap array texture with mipmaps.
This software package contains:
- libktx: a small library of functions for writing and reading KTX
files, and instantiating OpenGL®, OpenGL ES™️ and Vulkan® textures
from them.
- ktx2check: a tool for validating KTX Version 2 format files.
- ktx2ktx2: a tool for converting a KTX Version 1 file to a KTX Version
2 file.
- ktxinfo: a tool to display information about a KTX file in human
readable form.
- ktxsc: a tool to supercompress a KTX Version 2 file that contains
uncompressed images.
- toktx: a tool to create KTX files from PNG, Netpbm or JPEG format
images. It supports mipmap generation, encoding to Basis Universal
formats and Zstd supercompression.
'';
homepage = "https://github.com/KhronosGroup/KTX-Software";
license = licenses.asl20;
maintainers = with lib.maintainers; [bonsairobo];
platforms = platforms.linux;
};
}

0 comments on commit 694cbb9

Please sign in to comment.