about summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-03-12 18:01:46 +0000
committerGitHub <noreply@github.com>2024-03-12 18:01:46 +0000
commit6b78f024b2edf7110b60f66060cb74579b362afb (patch)
tree5fa2674e2363466d9fcc056710082a4a00a1ab29 /pkgs/tools/graphics
parenta2569dbec0e771c361f23d413b1ace61c3a7cc67 (diff)
parent14feac318eefa31d936d9b6a2aacb1928899abfe (diff)
downloadnixlib-6b78f024b2edf7110b60f66060cb74579b362afb.tar
nixlib-6b78f024b2edf7110b60f66060cb74579b362afb.tar.gz
nixlib-6b78f024b2edf7110b60f66060cb74579b362afb.tar.bz2
nixlib-6b78f024b2edf7110b60f66060cb74579b362afb.tar.lz
nixlib-6b78f024b2edf7110b60f66060cb74579b362afb.tar.xz
nixlib-6b78f024b2edf7110b60f66060cb74579b362afb.tar.zst
nixlib-6b78f024b2edf7110b60f66060cb74579b362afb.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch12
-rw-r--r--pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix7
2 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch
index faeb65d3b847..19453e8912a9 100644
--- a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch
+++ b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch
@@ -1,13 +1,15 @@
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1e7b71a..9db85b1 100644
+index 1e7b71a..e743ab0 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -107,6 +107,8 @@ if(USE_SYSTEM_NCNN)
+@@ -106,9 +106,9 @@ if(USE_SYSTEM_NCNN)
+         message(STATUS "Using glslang install located at ${GLSLANG_TARGET_DIR}")
 
          find_package(Threads)
++        find_package(SPIRV-Tools-opt REQUIRED)
 
-+        include("${GLSLANG_TARGET_DIR}/SPIRV-Tools/SPIRV-ToolsTarget.cmake")
-+        include("${GLSLANG_TARGET_DIR}/SPIRV-Tools-opt/SPIRV-Tools-optTargets.cmake")
          include("${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake")
-         include("${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake")
+-        include("${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake")
          if(EXISTS "${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
+             # hlsl support can be optional
+             include("${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
diff --git a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix
index 6a3b66a3548c..c7f9817326b8 100644
--- a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix
+++ b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix
@@ -50,15 +50,20 @@ stdenv.mkDerivation rec {
 
   installPhase = ''
     mkdir -p $out/bin $out/share
+
     cp realesrgan-ncnn-vulkan $out/bin/
     cp -r ${models}/models $out/share
   '';
 
+  postFixup = ''
+    patchelf $out/bin/realesrgan-ncnn-vulkan --add-needed libvulkan.so
+  '';
+
   meta = with lib; {
     description = "NCNN implementation of Real-ESRGAN. Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration";
     homepage = "https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan";
     license = licenses.mit;
-    maintainers = with maintainers; [ tilcreator ];
+    maintainers = with maintainers; [ tilcreator iynaix ];
     platforms = platforms.all;
     mainProgram = "realesrgan-ncnn-vulkan";
   };