-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: python311Packages.nerfstudio: init at 1.1.2 #320599
base: master
Are you sure you want to change the base?
Changes from 2 commits
6909fb9
cec46d3
56dfd7c
6d192c8
f72faf5
ead454f
85036ca
e84b60e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
cmake, | ||
open3d, | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "directxmath"; | ||
version = "2024-02"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "microsoft"; | ||
repo = "DirectXMath"; | ||
rev = "feb2024"; | ||
hash = "sha256-BXiI6h3rGRwDjOXMm6OLSgxXVZJnmAZ4wTFZL2RrwRA="; | ||
}; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
|
||
# WSL stubs taken from | ||
# https://github.com/isl-org/Open3D/blob/ad17a26332d93c0de4bd67218d0134c9deab7b93/3rdparty/uvatlas/uvatlas.cmake#L44-L46 | ||
postInstall = '' | ||
cp ${open3d.src}/3rdparty/uvatlas/sal.h "''${!outputDev}/include/directxmath/" | ||
''; | ||
|
||
meta = { | ||
description = "DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps"; | ||
homepage = "https://github.com/microsoft/DirectXMath"; | ||
license = lib.licenses.mit; | ||
maintainers = with lib.maintainers; [ SomeoneSerge ]; | ||
mainProgram = "directxmath"; | ||
platforms = lib.platforms.all; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,134 @@ | ||||||
{ | ||||||
lib, | ||||||
clangStdenv, | ||||||
fetchFromGitHub, | ||||||
cmake, | ||||||
assimp, | ||||||
libGL, | ||||||
python3Packages, | ||||||
spirv-tools, | ||||||
spirv-cross, | ||||||
spirv-headers, | ||||||
glslang, | ||||||
draco, | ||||||
gtest, | ||||||
robin-map, | ||||||
meshoptimizer, | ||||||
xorg, | ||||||
imgui, | ||||||
stb, | ||||||
}: | ||||||
|
||||||
clangStdenv.mkDerivation rec { | ||||||
pname = "filament"; | ||||||
version = "1.52.3"; | ||||||
|
||||||
src = fetchFromGitHub { | ||||||
owner = "google"; | ||||||
repo = "filament"; | ||||||
rev = "v${version}"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
hash = "sha256-hKyyYSGvQnaS8vnYkm92PiSeMvjcIXza11ZvymhC+zk="; | ||||||
}; | ||||||
|
||||||
# If you wish to un-vendor e.g. spirv-*, you could add extra find_package()s | ||||||
# and ALIAS libs here, so as to match the phony targets declared in third_party/: | ||||||
extraFindPackages = '' | ||||||
find_package(tsl-robin-map REQUIRED GLOBAL) | ||||||
add_library(tsl ALIAS tsl::robin_map) | ||||||
|
||||||
find_package(draco REQUIRED GLOBAL) | ||||||
add_library(dracodec ALIAS draco::draco_static) | ||||||
''; | ||||||
|
||||||
postPatch = '' | ||||||
# Hard-codes libc++ for no reason, then fails with a warning-error about | ||||||
# the unused -stdlib argument | ||||||
sed -i 's/^.*libc++.*$//' CMakeLists.txt | ||||||
|
||||||
# Upstream vendors everything in the good world, | ||||||
# but most of the time their target_link_libraries() works | ||||||
# out of the box with out buildInputs simply because the sonames match | ||||||
sed -i 's/^.*add_subdirectory.*EXTERNAL.*\(${ | ||||||
lib.concatStringsSep "\\|" [ | ||||||
"draco" | ||||||
"robin-map" | ||||||
|
||||||
# They vendor an outdated imgui with different interfaces, | ||||||
# so we can't use ours: | ||||||
# "imgui" | ||||||
|
||||||
"libgtest" | ||||||
|
||||||
# Failed to un-vendor for various reasons: | ||||||
# "assimp" | ||||||
# "stb" | ||||||
# "meshoptimizer" | ||||||
# "spirv-tools" | ||||||
# "glslang" | ||||||
# "spirv-cross" | ||||||
] | ||||||
}\).*$//' CMakeLists.txt | ||||||
|
||||||
substituteInPlace CMakeLists.txt \ | ||||||
--replace-fail "# Sub-projects" "# Sub-projects | ||||||
$extraFindPackages" | ||||||
|
||||||
# Uses the otherwise undeclared uint32_t: | ||||||
sed -i "1i#include <cstdint>" tools/glslminifier/src/GlslMinify.h | ||||||
|
||||||
# An undeclared snprintf | ||||||
sed -i "1i#include <stdio.h>" third_party/vkmemalloc/tnt/../include/vk_mem_alloc.h | ||||||
|
||||||
# std::memcpy | ||||||
sed -i "1i#include <cstring>" libs/gltfio/src/extended/TangentsJobExtended.cpp | ||||||
|
||||||
# Add a detailed trace to an otherwise obscure script | ||||||
sed -i "2iset -x" build/linux/combine-static-libs.sh | ||||||
|
||||||
# Otherwise CMake fails to execute build/linux/combine-static-libs.sh | ||||||
patchShebangs . | ||||||
''; | ||||||
|
||||||
nativeBuildInputs = [ | ||||||
cmake | ||||||
python3Packages.python | ||||||
spirv-tools | ||||||
spirv-cross | ||||||
]; | ||||||
buildInputs = | ||||||
[ | ||||||
# assimp | ||||||
draco | ||||||
glslang | ||||||
gtest | ||||||
# imgui | ||||||
meshoptimizer | ||||||
robin-map | ||||||
spirv-headers | ||||||
stb | ||||||
] | ||||||
++ lib.optionals clangStdenv.hostPlatform.isLinux [ | ||||||
libGL | ||||||
xorg.libX11 | ||||||
xorg.libXext | ||||||
xorg.libXi | ||||||
xorg.libXxf86vm | ||||||
]; | ||||||
|
||||||
# Upstream hard-codes -Werror someplace that's hard to identify | ||||||
NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; | ||||||
|
||||||
cmakeFlags = [ | ||||||
# https://github.com/isl-org/Open3D/blob/f7161f4949d1a9c2b016899d2f8c7bdbfd6bf6f9/3rdparty/filament/filament_build.cmake#L74C11-L74C50 | ||||||
(lib.cmakeFeature "FILAMENT_OPENGL_HANDLE_ARENA_SIZE_IN_MB" "20") | ||||||
]; | ||||||
|
||||||
meta = with lib; { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
description = "Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
homepage = "https://github.com/google/filament"; | ||||||
license = licenses.asl20; | ||||||
maintainers = with maintainers; [ ]; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't you add yourself ? |
||||||
mainProgram = "filament"; | ||||||
platforms = platforms.all; | ||||||
}; | ||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchzip, | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
name = "liblzf"; | ||
src = fetchzip { | ||
urls = [ | ||
"http://dist.schmorp.de/liblzf/Attic/liblzf-3.6.tar.gz" | ||
]; | ||
hash = "sha256-m5MZfYAT9AtAXh2zk3lZasTfTGVbY8KWnyeftMaLanQ="; | ||
}; | ||
meta = { | ||
description = "A small data compression library"; | ||
homepage = "http://software.schmorp.de/pkg/liblzf.html"; | ||
license = lib.licenses.bsd2 // { | ||
# Alternatively available under gpl2 | ||
url = "http://cvs.schmorp.de/liblzf/LICENSE?revision=1.7&view=markup"; | ||
}; | ||
maintainers = with lib.maintainers; [ SomeoneSerge ]; | ||
platforms = lib.platforms.all; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From f5afa1c4c47db3ea3b24f9eb33a4efceafa10e3e Mon Sep 17 00:00:00 2001 | ||
From: Someone Serge <[email protected]> | ||
Date: Mon, 17 Jun 2024 02:54:29 +0000 | ||
Subject: [PATCH] cmake: correct msgpack package name | ||
|
||
--- | ||
3rdparty/find_dependencies.cmake | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/3rdparty/find_dependencies.cmake b/3rdparty/find_dependencies.cmake | ||
index 45555b83a..40266805d 100644 | ||
--- a/3rdparty/find_dependencies.cmake | ||
+++ b/3rdparty/find_dependencies.cmake | ||
@@ -1446,7 +1446,7 @@ endif() | ||
# msgpack | ||
if(USE_SYSTEM_MSGPACK) | ||
open3d_find_package_3rdparty_library(3rdparty_msgpack | ||
- PACKAGE msgpack-cxx | ||
+ PACKAGE msgpack | ||
TARGETS msgpack-cxx | ||
) | ||
if(NOT 3rdparty_msgpack_FOUND) | ||
-- | ||
2.44.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
cmake_policy(PUSH) | ||
|
||
find_library( | ||
FILAMENT_LIBRARY | ||
NAMES filament | ||
HINTS ${filament_DIR} | ||
PATH_SUFFIXES lib lib/x86_64) | ||
|
||
find_library( | ||
FILAMENT_GEOMETRY_LIBRARY | ||
NAMES geometry | ||
HINTS ${filament_DIR} | ||
PATH_SUFFIXES lib lib/x86_64) | ||
|
||
find_library( | ||
FILAMENT_IMAGE_LIBRARY | ||
NAMES image | ||
HINTS ${filament_DIR} | ||
PATH_SUFFIXES lib lib/x86_64) | ||
|
||
find_path( | ||
FILAMENT_INCLUDE_DIR FilamentAPI.h | ||
HINTS ${filament_DIR} | ||
PATH_SUFFIXES include/filament) | ||
find_path( | ||
FILAMENT_GEOMETRY_INCLUDE_DIR TangentSpaceMesh.h | ||
HINTS ${filament_DIR} | ||
PATH_SUFFIXES include/geometry) | ||
find_path( | ||
FILAMENT_IMAGE_INCLUDE_DIR Ktx1Bundle.h | ||
HINTS ${filament_DIR} | ||
PATH_SUFFIXES include/image) | ||
|
||
find_program( | ||
FILAMENT_MATC | ||
NAMES matc | ||
HINTS ${filament_DIR}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args( | ||
filament | ||
REQUIRED_VARS FILAMENT_LIBRARY FILAMENT_GEOMETRY_LIBRARY | ||
FILAMENT_IMAGE_LIBRARY FILAMENT_MATC FILAMENT_INCLUDE_DIR) | ||
if(filament_FOUND) | ||
if(NOT TARGET filament::filament) | ||
add_library(filament::filament INTERFACE IMPORTED) | ||
target_link_libraries(filament::filament INTERFACE "${FILAMENT_LIBRARY}") | ||
target_include_directories(filament::filament SYSTEM | ||
INTERFACE "${FILAMENT_INCLUDE_DIR}") | ||
endif() | ||
if(NOT TARGET filament::geometry) | ||
add_library(filament::geometry INTERFACE IMPORTED) | ||
target_link_libraries(filament::geometry | ||
INTERFACE "${FILAMENT_GEOMETRY_LIBRARY}") | ||
target_include_directories(filament::geometry SYSTEM | ||
INTERFACE "${FILAMENT_GEOMETRY_INCLUDE_DIR}") | ||
endif() | ||
if(NOT TARGET filament::image) | ||
add_library(filament::image INTERFACE IMPORTED) | ||
target_link_libraries(filament::image INTERFACE "${FILAMENT_IMAGE_LIBRARY}") | ||
target_include_directories(filament::image SYSTEM | ||
INTERFACE "${FILAMENT_IMAGE_INCLUDE_DIR}") | ||
endif() | ||
endif() | ||
|
||
cmake_policy(POP) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cmake_policy(PUSH) | ||
find_library( | ||
LIBLZF_LIBRARY | ||
NAMES lzf | ||
PATH_SUFFIXES lib) | ||
find_path(LIBLZF_INCLUDE_DIR lzf.h PATH_SUFFIXES include) | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(liblzf REQUIRED_VARS LIBLZF_LIBRARY | ||
LIBLZF_INCLUDE_DIR) | ||
if(liblzf_FOUND) | ||
if(NOT TARGET liblzf::liblzf) | ||
add_library(liblzf::liblzf INTERFACE IMPORTED) | ||
target_link_libraries(liblzf::liblzf INTERFACE "${LIBLZF_LIBRARY}") | ||
target_include_directories(liblzf::liblzf SYSTEM | ||
INTERFACE "${LIBLZF_INCLUDE_DIR}") | ||
endif() | ||
endif() | ||
cmake_policy(POP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.