Skip to content
Open
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
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26717,6 +26717,11 @@
githubId = 555003;
name = "Taylor Everding";
};
taylorhoward92 = {
github = "taylorhoward92";
githubId = 23712266;
name = "Taylor Howard";
};
tazjin = {
email = "mail@tazj.in";
github = "tazjin";
Expand Down
22 changes: 10 additions & 12 deletions pkgs/by-name/gz/gz-cmake/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
nix-update-script,
}:
let
version = "5.0.0";
version = "5.1.1";
versionPrefix = "gz-cmake${lib.versions.major version}";
in
stdenv.mkDerivation (finalAttrs: {
Expand All @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "gazebosim";
repo = "gz-cmake";
tag = "${versionPrefix}_${finalAttrs.version}";
hash = "sha256-XF7oglj9Xr6F8a+6uowrY5a040yl4FZlFfW/Y0BJwOs=";
hash = "sha256-bp3qaLuE/0sf6u4ZVOGsuJVkuEm2IS0zB0vHMVE0g/g=";
};

postPatch = ''
Expand Down Expand Up @@ -52,21 +52,19 @@ stdenv.mkDerivation (finalAttrs: {

doCheck = true;

passthru = {
# bulk updater selects wrong tag
skipBulkUpdates = true;
updateScript = nix-update-script {
extraArgs = [ "--version-regex=gz-cmake(.*)" ];
};
passthru.updateScript = nix-update-script {
extraArgs = [ "--version-regex=${versionPrefix}_([\\d\\.]+)" ];
Comment on lines -55 to +56
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The proposed regex should allow the bulk updater to properly select just the semantic version from the repo tags.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok.

};

meta = {
description = "CMake modules to build Gazebo projects";
homepage = "https://github.com/gazebosim/gz-cmake";
changelog = "https://github.com/gazebosim/gz-cmake/releases/tag/${finalAttrs.src.tag}";
changelog = "https://github.com/gazebosim/gz-cmake/blob/${finalAttrs.src.tag}/Changelog.md";
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ guelakais ];
badPlatforms = lib.platforms.darwin; # hard replicable building error
platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = with lib.maintainers; [
guelakais
taylorhoward92
];
};
})
122 changes: 122 additions & 0 deletions pkgs/by-name/gz/gz-common/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
cmake,
pkg-config,
gz-cmake,
gz-math,
gz-utils,
tinyxml-2,
spdlog,
libuuid,
assimp,
gdal,
ffmpeg,
zlib,
ctestCheckHook,
python3,
gtest,
nix-update-script,
testers,
}:
let
version = "7.1.1";
versionPrefix = "gz-common${lib.versions.major version}";
in
stdenv.mkDerivation (finalAttrs: {
pname = "gz-common";
inherit version;

strictDeps = true;
__structuredAttrs = true;

src = fetchFromGitHub {
owner = "gazebosim";
repo = "gz-common";
tag = "${versionPrefix}_${finalAttrs.version}";
hash = "sha256-0+C2gvX7vF/8DbRfX0rftbrYydO6zHYXAhWDe3YXWcs=";
};

patches = [
# Replace FreeImage with STB image headers (vendored).
# TODO: Remove after update to > 7.1.1
(fetchpatch2 {
url = "https://github.com/gazebosim/gz-common/commit/a2d36c050b8e93e23b3d8d5ec1abb7b87c61cfdc.patch?full_index=1";
hash = "sha256-Zk6kFfWWSwNon/HcLDMmmO1XZrMUoPbc6bk0zAXXN9Y=";
})

# Replace hardcoded /home with /tmp in SystemPaths_TEST.cc FindFile test.
# TODO: Remove after update to > 7.1.1
(fetchpatch2 {
url = "https://github.com/gazebosim/gz-common/commit/2d63d3f5b3f4b29418955a7c266a199f803e6d5c.patch?full_index=1";
hash = "sha256-Gws0KVhfGd61uPNC1gJXlCaY81tVZeU6PlqcJA40LeA=";
})
];

nativeBuildInputs = [
cmake
pkg-config
];

buildInputs = [
gz-cmake
# direct DT_NEEDED of libgz-common-graphics.so (linked via assimp/gdal)
zlib
];

propagatedBuildInputs = [
assimp
ffmpeg
gdal
gz-math
gz-utils
spdlog
tinyxml-2
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libuuid
];

nativeCheckInputs = [
ctestCheckHook
python3
];

checkInputs = [ gtest ];

disabledTests = [
# Timing-sensitive under Nix build load
"INTEGRATION_encoder_timing"
"UNIT_WorkerPool_TEST"
# Signal handling is unreliable in the Nix sandbox
"UNIT_SignalHandler_TEST"
];

doCheck = true;

preCheck = ''
# Some test cases use $HOME
export HOME=$(mktemp -d)
'';

passthru = {
tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
updateScript = nix-update-script {
extraArgs = [ "--version-regex=${versionPrefix}_([\\d\\.]+)" ];
};
};
Comment on lines +104 to +111
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry I'm not really sure what you mean? I have added a similar passthru for each package.


meta = {
description = "Common libraries for the Gazebo projects (audio, graphics, geospatial, AV)";
homepage = "https://github.com/gazebosim/gz-common";
changelog = "https://github.com/gazebosim/gz-common/blob/${finalAttrs.src.tag}/Changelog.md";
license = lib.licenses.asl20;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
pkgConfigModules = [ "gz-common" ];
maintainers = with lib.maintainers; [ taylorhoward92 ];
};
})
111 changes: 111 additions & 0 deletions pkgs/by-name/gz/gz-fuel-tools/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ctestCheckHook,
pkg-config,
gz-cmake,
gz-common,
gz-msgs,
gz-tools,
curl,
jsoncpp,
libyaml,
libzip,
tinyxml-2,
python3,
gtest,
nix-update-script,
testers,
}:
let
version = "11.0.0";
versionPrefix = "gz-fuel-tools${lib.versions.major version}";
in
stdenv.mkDerivation (finalAttrs: {
pname = "gz-fuel-tools";
inherit version;

strictDeps = true;
__structuredAttrs = true;

src = fetchFromGitHub {
owner = "gazebosim";
repo = "gz-fuel-tools";
tag = "${versionPrefix}_${finalAttrs.version}";
hash = "sha256-IFnaXBURpN5xTCxFjlcZk9n0sCsUnPBr3NUZrf7Xde0=";
};

patches = [
# Upstream bug: the test YAML config points library_path at src/cmd/cmdfuel11
# instead of the generated Ruby script in test/lib/ruby/gz/cmdfuel11.
# Also switch to configure_file + file(GENERATE) so $<CONFIG> is resolved.
# https://github.com/gazebosim/gz-fuel-tools/pull/501
./patches/pr-501.patch
];

nativeBuildInputs = [
cmake
pkg-config
];

buildInputs = [
gz-cmake
];

propagatedBuildInputs = [
libzip
curl
gz-common
gz-msgs
gz-tools
jsoncpp
libyaml
tinyxml-2
];

nativeCheckInputs = [
ctestCheckHook
python3
];

checkInputs = [ gtest ];

disabledTests = [
# Requires network access (unavailable in Nix sandbox).
"UNIT_FuelClient_TEST"
"UNIT_Interface_TEST"
"UNIT_gz_TEST"
"UNIT_gz_src_TEST"
];

preCheck = ''
# Some test cases use $HOME.
export HOME=$(mktemp -d)

# Point tests at the generated config files in the build tree.
export GZ_CONFIG_PATH=$PWD/test/conf
'';

doCheck = true;

passthru = {
tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
updateScript = nix-update-script {
extraArgs = [ "--version-regex=${versionPrefix}_([\\d\\.]+)" ];
};
};

meta = {
description = "Client library and command line tools for interacting with Gazebo Fuel servers";
homepage = "https://github.com/gazebosim/gz-fuel-tools";
changelog = "https://github.com/gazebosim/gz-fuel-tools/blob/${finalAttrs.src.tag}/Changelog.md";
license = lib.licenses.asl20;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
pkgConfigModules = [ "gz-fuel-tools" ];
maintainers = with lib.maintainers; [ taylorhoward92 ];
};
})
22 changes: 22 additions & 0 deletions pkgs/by-name/gz/gz-fuel-tools/patches/pr-501.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt
index 2cffca0e..972fba99 100644
--- a/conf/CMakeLists.txt
+++ b/conf/CMakeLists.txt
@@ -1,11 +1,15 @@
-set(gz_library_path "${CMAKE_BINARY_DIR}/src/cmd/cmdfuel${PROJECT_VERSION_MAJOR}")
+set(gz_library_path "${CMAKE_BINARY_DIR}/test/lib/$<CONFIG>/ruby/gz/cmdfuel${PROJECT_VERSION_MAJOR}")

# Generate a configuration file for internal testing.
# Note that the major version of the library is included in the name.
# Ex: fuel0.yaml
configure_file(
"fuel.yaml.in"
- "${CMAKE_BINARY_DIR}/test/conf/fuel${PROJECT_VERSION_MAJOR}.yaml" @ONLY)
+ "${CMAKE_CURRENT_BINARY_DIR}/fuel${PROJECT_VERSION_MAJOR}.yaml.configured" @ONLY)
+
+file(GENERATE
+ OUTPUT "${CMAKE_BINARY_DIR}/test/conf/$<CONFIG>/fuel${PROJECT_VERSION_MAJOR}.yaml"
+ INPUT "${CMAKE_CURRENT_BINARY_DIR}/fuel${PROJECT_VERSION_MAJOR}.yaml.configured")

set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/gz/cmdfuel${PROJECT_VERSION_MAJOR}")

Loading
Loading