From 0a08e401d26785638c09ce378c282924e3ddbaf9 Mon Sep 17 00:00:00 2001 From: yuuko Date: Sun, 15 Dec 2024 06:12:40 -0800 Subject: pkgs: add some texture authoring tools --- srcds-pkgs/vtflib.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 srcds-pkgs/vtflib.nix (limited to 'srcds-pkgs/vtflib.nix') diff --git a/srcds-pkgs/vtflib.nix b/srcds-pkgs/vtflib.nix new file mode 100644 index 0000000..a2dd600 --- /dev/null +++ b/srcds-pkgs/vtflib.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchFromGitHub, cmake, libtxc_dxtn +, libGLU, fakegl }: +let + gl = if stdenv.isDarwin then fakegl else libGLU; +in +stdenv.mkDerivation rec { + pname = "VTFLib"; + version = "2022-10-08"; + + src = fetchFromGitHub { + owner = "panzi"; + repo = pname; + rev = "eaca22de46dc62ccfbac6720a68ae3a82b86907e"; + hash = "sha256-Q2puLqOZSJ2ZO06U8M8Khs4uRzh1vdPptRlzmfi874M="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libtxc_dxtn gl ]; + + postPatch = '' + substituteInPlace VTFLib.pc.in --replace \ + "''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@" \ + "@CMAKE_INSTALL_FULL_LIBDIR" + ''; + + meta = { + homepage = src.url; + description = "Linux port of Nem's VTFLib"; + license = lib.licenses.lgpl21Plus; + platforms = lib.platforms.unix; + }; +} -- cgit v1.2.3