Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions pkgs/applications/graphics/tauray/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, graphviz
, doxygen
, pkg-config
, python3
, libcbor
, czmq
, glm
, nng
, mbedtls
, openxr-loader
, SDL2
, shaderc
, spirv-headers
, vulkan-headers
, vulkan-loader
, wayland
}:

stdenv.mkDerivation (finalAttrs: {
pname = "tauray";
version = "1.0.1";

src = fetchFromGitHub {
owner = "vga-group";
repo = "tauray";
rev = "v${finalAttrs.version}";
sha256 = "sha256-Q3Dv96iptDvmBp9mIVSYzb7EnIzD1kFejwrFuc1HqdU=";
fetchSubmodules = true;
Comment on lines +23 to +32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stdenv.mkDerivation (finalAttrs: {
pname = "tauray";
version = "1.0.1";
src = fetchFromGitHub {
owner = "vga-group";
repo = "tauray";
rev = "v${finalAttrs.version}";
sha256 = "sha256-Q3Dv96iptDvmBp9mIVSYzb7EnIzD1kFejwrFuc1HqdU=";
fetchSubmodules = true;
stdenv.mkDerivation {
pname = "tauray";
version = "1.0.1";
src = fetchFromGitHub {
owner = "vga-group";
repo = "tauray";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-Q3Dv96iptDvmBp9mIVSYzb7EnIzD1kFejwrFuc1HqdU=";

We have multiple of those submodules in nixpkgs https://github.com/vga-group/tauray/blob/main/.gitmodules

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would I go about fetching only the ones that aren't in nixpkgs? Some of them also break compatibility frequently so they need to be pinned to specific versions according to upstream.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fetcher has no support for that. If it is only one it can be manually done. If there are multiple that is cumbersome. Are there options to build with a system variant? If not we could rm the replaced submodules in postFetch and then symlink ours into place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately there are no options for that. I'd have to PR such a change upstream first.

IIRC when I asked about it the response I got was that vulkan-headers need to be pinned since tauray uses the C++ bindings which have changed multiple times without warning and glslang is used through its library interface which is unstable. Spirv-headers and OpenXR-SDK are probably okay to replace with a packaged version. fuchsia_radix_sort would need to be packaged manually but there are no changes on the horizon to it so it should be quite safe too.

};

buildInputs = [
czmq
glm
libcbor
nng
mbedtls
openxr-loader
(SDL2.override { withStatic = true; })
vulkan-loader
wayland
];

nativeBuildInputs = [
cmake
graphviz
doxygen
pkg-config
python3
shaderc
vulkan-headers
];

meta = with lib; {
description = "A real-time rendering framework, with a focus on distributed computing, scalability, portability and low latency";
homepage = "https://github.com/vga-group/tauray";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ jansol ];
platforms = platforms.linux ++ platforms.darwin;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

platforms?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Darwin is untested and kind of pointless since moltenVK does not have ray tracing extensions available (for now) but it should work and there is a rasterizer mode too, so adding the platform anyway.

})

2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,8 @@ with pkgs;

tauon = callPackage ../applications/audio/tauon { };

tauray = callPackage ../applications/graphics/tauray { };

tere = callPackage ../tools/misc/tere { };

termusic = callPackage ../applications/audio/termusic { };
Expand Down