fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ stdenv, fetchsvn, cmake, libpng, ilmbase, libtiff, zlib, libjpeg
2, mesa, libX11
3}:
4
5stdenv.mkDerivation rec {
6 # No support yet for cg, cuda, glew, glut, openexr.
7
8 name = "nvidia-texture-tools-1388";
9
10 src = fetchsvn {
11 url = "http://nvidia-texture-tools.googlecode.com/svn/trunk";
12 rev = "1388";
13 sha256 = "0pwxqx5l16nqidzm6mwd3rd4gbbknkz6q8cxnvf7sggjpbcvm2d6";
14 };
15
16 buildInputs = [ cmake libpng ilmbase libtiff zlib libjpeg mesa libX11 ];
17
18 patchPhase = ''
19 # Fix build due to missing dependnecies.
20 echo 'target_link_libraries(bc7 nvmath)' >> src/nvtt/bc7/CMakeLists.txt
21 echo 'target_link_libraries(bc6h nvmath)' >> src/nvtt/bc6h/CMakeLists.txt
22
23 # Make a recently added pure virtual function just virtual,
24 # to keep compatibility.
25 sed -i 's/virtual void endImage() = 0;/virtual void endImage() {}/' src/nvtt/nvtt.h
26
27 # Fix building shared libraries.
28 sed -i 's/SET(NVIMAGE_SHARED TRUE)/SET(NVIMAGE_SHARED TRUE)\nSET(NVTHREAD_SHARED TRUE)/' CMakeLists.txt
29 '';
30
31 cmakeFlags = [
32 "-DNVTT_SHARED=TRUE"
33 ];
34
35 meta = {
36 description = "A set of cuda-enabled texture tools and compressors";
37 homepage = "http://developer.nvidia.com/object/texture_tools.html";
38 license = stdenv.lib.licenses.mit;
39 platforms = stdenv.lib.platforms.linux;
40 };
41}