about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/ncnn
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
commita5e1520e4538e29ecfbd4b168306f890566d7bfd (patch)
tree28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/development/libraries/ncnn
parent822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff)
parent3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff)
downloadnixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/ncnn')
-rw-r--r--nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch23
-rw-r--r--nixpkgs/pkgs/development/libraries/ncnn/default.nix6
2 files changed, 18 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch b/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
index bdb3063acec4..a43d7b0c4b72 100644
--- a/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
+++ b/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
@@ -1,18 +1,27 @@
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c453d23e..66b4aa24 100644
+index 785e2cd..459024d 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -560,6 +560,8 @@ if(NCNN_VULKAN)
-                 message(WARNING "GLSLANG_TARGET_DIR must be defined! NCNN_SYSTEM_GLSLANG will be turned off.")
+@@ -589,7 +589,8 @@ endif()
+ if(NCNN_VULKAN)
+     if(NCNN_SYSTEM_GLSLANG)
+         find_package(Threads)
+-        find_package(glslang QUIET)
++        find_package(SPIRV-Tools-opt REQUIRED)
++        find_package(glslang REQUIRED)
+         if(glslang_FOUND)
+             add_library(glslang ALIAS glslang::glslang)
+             add_library(SPIRV ALIAS glslang::SPIRV)
+@@ -601,7 +602,6 @@ if(NCNN_VULKAN)
                  set(NCNN_SYSTEM_GLSLANG OFF)
              else()
-+                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/src/ncnn.pc.in b/src/ncnn.pc.in
-index b580fcee..be2becd0 100644
+index b580fce..be2becd 100644
 --- a/src/ncnn.pc.in
 +++ b/src/ncnn.pc.in
 @@ -1,6 +1,6 @@
diff --git a/nixpkgs/pkgs/development/libraries/ncnn/default.nix b/nixpkgs/pkgs/development/libraries/ncnn/default.nix
index 69967eae160d..71b4bbc8fd42 100644
--- a/nixpkgs/pkgs/development/libraries/ncnn/default.nix
+++ b/nixpkgs/pkgs/development/libraries/ncnn/default.nix
@@ -11,13 +11,13 @@
 
 stdenv.mkDerivation rec {
   pname = "ncnn";
-  version = "20231027";
+  version = "20240102";
 
   src = fetchFromGitHub {
     owner = "Tencent";
     repo = pname;
     rev = version;
-    sha256 = "sha256-ak/5QTOptg5M2I+3olnrBK6JZ01haIE6oh+sagEboAc=";
+    hash = "sha256-kk70oLY+2QJOkyYq10whLRMxBuibQMWMOBA9dcbKf/I=";
   };
 
   patches = [
@@ -33,8 +33,6 @@ stdenv.mkDerivation rec {
     "-DNCNN_BUILD_TOOLS=0"
     "-DNCNN_SYSTEM_GLSLANG=1"
     "-DNCNN_PYTHON=0" # Should be an attribute
-
-    "-DGLSLANG_TARGET_DIR=${glslang}/lib/cmake"
   ];
 
   nativeBuildInputs = [ cmake ];