Skip to content
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

[Backport release-21.11] vengi-tools: 0.0.14 -> 0.0.18 and related changes #158116

Merged
Merged
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
19 changes: 12 additions & 7 deletions pkgs/applications/graphics/vengi-tools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, fetchurl
, writeText

, cmake
, pkg-config
Expand All @@ -18,6 +19,7 @@
, libuuid
, wayland-protocols
, Carbon
, CoreServices
# optionals
, opencl-headers
, OpenCL
Expand All @@ -39,13 +41,13 @@ let cmake3_22 = cmake.overrideAttrs (old: {

in stdenv.mkDerivation rec {
pname = "vengi-tools";
version = "0.0.14";
version = "0.0.18";

src = fetchFromGitHub {
owner = "mgerhardy";
repo = "engine";
repo = "vengi";
rev = "v${version}";
sha256 = "sha256-v82hKskTSwM0NDgLVHpHZNRQW6tWug4pPIt91MrUwUo=";
sha256 = "sha256-Ur1X5FhOa87jbjWBXievBfCHW+qP/8bqLiyKAC8+KU4=";
};

nativeBuildInputs = [
Expand All @@ -69,7 +71,7 @@ in stdenv.mkDerivation rec {
#libpqxx
#mosquitto
] ++ lib.optional stdenv.isLinux wayland-protocols
++ lib.optionals stdenv.isDarwin [ Carbon OpenCL ]
++ lib.optionals stdenv.isDarwin [ Carbon CoreServices OpenCL ]
++ lib.optional (!stdenv.isDarwin) opencl-headers;

cmakeFlags = [
Expand All @@ -82,7 +84,7 @@ in stdenv.mkDerivation rec {
"-DGAMES=OFF"
"-DMAPVIEW=OFF"
"-DAIDEBUG=OFF"
];
] ++ lib.optional stdenv.isDarwin "-DCORESERVICES_LIB=${CoreServices}";

# Set the data directory for each executable. We cannot set it at build time
# with the PKGDATADIR cmake variable because each executable needs a specific
Expand All @@ -98,6 +100,7 @@ in stdenv.mkDerivation rec {

passthru.tests = {
voxconvert-roundtrip = callPackage ./test-voxconvert-roundtrip.nix {};
voxconvert-all-formats = callPackage ./test-voxconvert-all-formats.nix {};
run-voxedit = nixosTests.vengi-tools;
};

Expand All @@ -110,10 +113,12 @@ in stdenv.mkDerivation rec {
filemanager and a command line tool to convert between several voxel
formats.
'';
homepage = "https://mgerhardy.github.io/engine/";
downloadPage = "https://github.com/mgerhardy/engine/releases";
homepage = "https://mgerhardy.github.io/vengi/";
downloadPage = "https://github.com/mgerhardy/vengi/releases";
license = [ licenses.mit licenses.cc-by-sa-30 ];
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
# Requires SDK 10.14 https://github.com/NixOS/nixpkgs/issues/101229
broken = stdenv.isDarwin && stdenv.isx86_64;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ stdenv
, vengi-tools
}:

stdenv.mkDerivation {
name = "vengi-tools-test-voxconvert-all-formats";
meta.timeout = 10;
buildCommand = ''
mkdir $out
for format in vox qef qbt qb vxm vxr binvox gox cub vxl csv; do
echo Testing $format export
${vengi-tools}/bin/vengi-voxconvert --input ${vengi-tools}/share/vengi-voxedit/chr_knight.qb --output $out/chr_knight.$format
done
'';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ stdenv.mkDerivation {
name = "vengi-tools-test-voxconvert-roundtrip";
meta.timeout = 10;
buildCommand = ''
${vengi-tools}/bin/vengi-voxconvert ${vengi-tools}/share/vengi-voxedit/chr_knight.qb chr_knight.vox
${vengi-tools}/bin/vengi-voxconvert chr_knight.vox chr_knight.qb
${vengi-tools}/bin/vengi-voxconvert chr_knight.qb chr_knight1.vox
${vengi-tools}/bin/vengi-voxconvert --input ${vengi-tools}/share/vengi-voxedit/chr_knight.qb --output chr_knight.vox
${vengi-tools}/bin/vengi-voxconvert --input chr_knight.vox --output chr_knight.qb
${vengi-tools}/bin/vengi-voxconvert --input chr_knight.qb --output chr_knight1.vox
diff chr_knight.vox chr_knight1.vox
touch $out
'';
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28805,7 +28805,7 @@ with pkgs;
vdpauinfo = callPackage ../tools/X11/vdpauinfo { };

vengi-tools = callPackage ../applications/graphics/vengi-tools {
inherit (darwin.apple_sdk.frameworks) Carbon OpenCL;
inherit (darwin.apple_sdk.frameworks) Carbon CoreServices OpenCL;
};

verbiste = callPackage ../applications/misc/verbiste {
Expand Down