Merge pull request #276168 from wegank/nvidia-texture-tools-refactor

nvidia-texture-tools: refactor, migrate to by-name
This commit is contained in:
Weijia Wang 2024-01-03 01:42:33 +01:00 committed by GitHub
commit 5c82dd8912
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 12 deletions

View File

@ -1,20 +1,20 @@
{ lib, stdenv, fetchFromGitHub, cmake, fetchpatch }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "nvidia-texture-tools";
version = "unstable-2020-12-21";
version = "2.1.2-unstable-2020-12-21";
src = fetchFromGitHub {
owner = "castano";
repo = "nvidia-texture-tools";
rev = "aeddd65f81d36d8cb7b169b469ef25156666077e";
sha256 = "sha256-BYNm8CxPQbfmnnzNmOQ2Dc8HSyO8mkqzYsBZ5T80398=";
hash = "sha256-BYNm8CxPQbfmnnzNmOQ2Dc8HSyO8mkqzYsBZ5T80398=";
};
nativeBuildInputs = [ cmake ];
outputs = [ "out" "dev" "lib" ];
postPatch = ''
# Make a recently added pure virtual function just virtual,
# to keep compatibility.
@ -25,8 +25,14 @@ stdenv.mkDerivation rec {
sed -i '/libsquish/d;/CMP_Core/d' extern/CMakeLists.txt
'';
outputs = [ "out" "dev" "lib" ];
nativeBuildInputs = [
cmake
];
cmakeFlags = [
"-DNVTT_SHARED=TRUE"
(lib.cmakeBool "NVTT_SHARED" true)
];
postInstall = ''
@ -38,7 +44,7 @@ stdenv.mkDerivation rec {
description = "A set of cuda-enabled texture tools and compressors";
homepage = "https://github.com/castano/nvidia-texture-tools";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ wegank ];
platforms = platforms.unix;
};
}

View File

@ -24237,8 +24237,6 @@ with pkgs;
configTemplate = ../applications/virtualization/nvidia-podman/config.toml;
};
nvidia-texture-tools = callPackage ../development/libraries/nvidia-texture-tools { };
nvidia-vaapi-driver = lib.hiPrio (callPackage ../development/libraries/nvidia-vaapi-driver { });
nvidia-optical-flow-sdk = callPackage ../development/libraries/nvidia-optical-flow-sdk { };