Skip to content

Commit

Permalink
nix: Separate nixGL wrapped rviz out, fix patches overlay typo
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomSpaceship committed Dec 10, 2024
1 parent 10fe8a6 commit fdb0191
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 2 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@
standardPkgs = {
inherit (pkgs) can-utils;
inherit (pkgs.ros)
natrviz
rviz2
rviz2-fixed
rosbag2
teleop-twist-keyboard
demo-nodes-cpp
Expand Down Expand Up @@ -167,7 +166,7 @@

# --- SCRIPTS ---
perseus = pkgs.writeShellScriptBin "perseus" ''
${default}/bin/ros2 pkg list
${default}/bin/ros2 launch perseus perseus.launch.py "$@"
'';
treefmt-write-config = pkgs.writeShellScriptBin "treefmt-write-config" ''
cd "$(git rev-parse --show-toplevel)"
Expand Down
5 changes: 1 addition & 4 deletions software/ros_ws/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ let
};
# additionally, override rviz by default to wrap it with nixGL since most people are on Ubuntu not NixOS
# also provide native rviz with an alias
rviz2 = prev.writeShellScriptBin "rviz2" ''
rviz2-fixed = prev.writeShellScriptBin "rviz2-fixed" ''
NIXPKGS_ALLOW_UNFREE=1 QT_QPA_PLATFORM=xcb QT_SCREEN_SCALE_FACTORS=1 nix run --impure "github:nix-community/nixGL" "${prev.lib.getExe rosPrev.rviz2}" -- "$@"
'';
natrviz = prev.writeShellScriptBin "natrviz" ''
exec "${prev.lib.getExe rosPrev.rviz2}" "$@"
'';
})
] rosFinal rosPrev);
in
Expand Down
2 changes: 1 addition & 1 deletion software/ros_ws/patches.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let
}:
{
dontWrapQtApps = false;
nativeBuildInputs = nativeBuildInputs ++ [ rosPrev.qt5.wrapQtAppsHook ];
nativeBuildInputs = nativeBuildInputs ++ [ prev.qt5.wrapQtAppsHook ];
postFixup =
postFixup
+ ''
Expand Down

0 comments on commit fdb0191

Please sign in to comment.