From c41ccd9ea58fbd42f94b210fffdd6133da49070b Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 23 Dec 2023 00:34:29 +0100 Subject: [PATCH 1/2] nvidia-texture-tools: refactor --- .../nvidia-texture-tools/default.nix | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/nvidia-texture-tools/default.nix b/pkgs/development/libraries/nvidia-texture-tools/default.nix index 3a907a6ba79d..0caa6277b5a9 100644 --- a/pkgs/development/libraries/nvidia-texture-tools/default.nix +++ b/pkgs/development/libraries/nvidia-texture-tools/default.nix @@ -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; }; } From 96e6782e874deb25afddb6f92ba2e6e9ab60f09c Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 23 Dec 2023 00:35:52 +0100 Subject: [PATCH 2/2] nvidia-texture-tools: migrate to by-name --- .../default.nix => by-name/nv/nvidia-texture-tools/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{development/libraries/nvidia-texture-tools/default.nix => by-name/nv/nvidia-texture-tools/package.nix} (100%) diff --git a/pkgs/development/libraries/nvidia-texture-tools/default.nix b/pkgs/by-name/nv/nvidia-texture-tools/package.nix similarity index 100% rename from pkgs/development/libraries/nvidia-texture-tools/default.nix rename to pkgs/by-name/nv/nvidia-texture-tools/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ae21ad1aeafb..9050555cb7e4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24251,8 +24251,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 { };