mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
75f1bb0097
Upstream issue: https://github.com/castano/nvidia-texture-tools/issues/298
43 lines
1.0 KiB
Nix
43 lines
1.0 KiB
Nix
{ stdenv, fetchFromGitHub, cmake }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nvidia-texture-tools";
|
|
version = "unstable-2019-10-27";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "castano";
|
|
repo = "nvidia-texture-tools";
|
|
rev = "a131e4c6b0b7c9c73ccc3c9e6f1c7e165be86bcc";
|
|
sha256 = "1qzyr3ib5dpxyq1y33lq02qv4cww075sm9bm4f651d34q5x38sk3";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
outputs = [ "out" "dev" "lib" ];
|
|
|
|
postPatch = ''
|
|
# 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"
|
|
];
|
|
|
|
postInstall = ''
|
|
moveToOutput include "$dev"
|
|
moveToOutput lib "$lib"
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A set of cuda-enabled texture tools and compressors";
|
|
homepage = https://github.com/castano/nvidia-texture-tools;
|
|
license = licenses.mit;
|
|
platforms = platforms.unix;
|
|
broken = stdenv.isAarch64;
|
|
};
|
|
}
|