nixpkgs/pkgs/development/libraries/nvidia-texture-tools/default.nix

43 lines
1.0 KiB
Nix
Raw Normal View History

2016-11-03 13:42:39 +00:00
{ stdenv, fetchFromGitHub, cmake }:
2014-06-18 22:17:43 +01:00
stdenv.mkDerivation rec {
pname = "nvidia-texture-tools";
version = "unstable-2019-10-27";
2016-11-03 13:42:39 +00:00
src = fetchFromGitHub {
owner = "castano";
repo = "nvidia-texture-tools";
rev = "a131e4c6b0b7c9c73ccc3c9e6f1c7e165be86bcc";
sha256 = "1qzyr3ib5dpxyq1y33lq02qv4cww075sm9bm4f651d34q5x38sk3";
2014-06-18 22:17:43 +01:00
};
2016-11-03 13:42:39 +00:00
nativeBuildInputs = [ cmake ];
2014-06-18 22:17:43 +01:00
2016-11-03 13:42:39 +00:00
outputs = [ "out" "dev" "lib" ];
2014-06-18 22:17:43 +01:00
2016-11-03 13:42:39 +00:00
postPatch = ''
2014-06-18 22:17:43 +01:00
# Make a recently added pure virtual function just virtual,
# to keep compatibility.
sed -i 's/virtual void endImage() = 0;/virtual void endImage() {}/' src/nvtt/nvtt.h
'';
cmakeFlags = [
"-DNVTT_SHARED=TRUE"
];
2016-11-03 13:42:39 +00:00
postInstall = ''
moveToOutput include "$dev"
moveToOutput lib "$lib"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
2014-06-18 22:17:43 +01:00
description = "A set of cuda-enabled texture tools and compressors";
homepage = "https://github.com/castano/nvidia-texture-tools";
2016-11-03 13:42:39 +00:00
license = licenses.mit;
2018-05-21 05:07:32 +01:00
platforms = platforms.unix;
broken = stdenv.isAarch64;
2014-06-18 22:17:43 +01:00
};
}