-
Notifications
You must be signed in to change notification settings - Fork 88
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
OMPL on Rolling fails to build #311
Comments
Here's the file it's complaining about:
|
Commenting this to link the issues: NixOS/nixpkgs#144170 |
Just ompl from Rolling and 23.05 instead of unstable; same issue:
|
|
Related? ompl/ompl#1101 (Yes, I see lopsided98 commented on it.) |
Yup, that PR fixes the issue. This flake builds correctly: {
description = "My ROS Project Build Environment";
nixConfig.bash-prompt = "[ros] ";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nix-ros-overlay.url = "github:lopsided98/nix-ros-overlay";
};
outputs = { self, nixpkgs, nix-ros-overlay }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; overlays = [ nix-ros-overlay.overlays.default ]; };
in
{
devShells.x86_64-linux.default = pkgs.mkShell {
name = "My ROS Project Build Environment";
buildInputs = with pkgs; with pkgs.rosPackages.rolling; [
(pkgs.rosPackages.rolling.ompl.overrideAttrs(oldAttrs: {
src = builtins.fetchGit {
url = "https://github.com/hacker1024/ompl.git";
rev = "1ddecbad87b454ac0d8e1821030e4cf7eeff2db2";
allRefs = true;
};
}))
];
};
};
} |
It's often more convenient to apply the commit as a patch - that way, the sources will always be up-to-date. ompl.overrideAttrs ({ patches ? [ ], ... }: {
patches = patches ++ [
# Use full install paths for pkg-config
(self.fetchpatch {
url = "https://github.com/hacker1024/ompl/commit/1ddecbad87b454ac0d8e1821030e4cf7eeff2db2.patch";
hash = "sha256-sAQLrWHoR/DhHk8TtUEy8E8VXqrvtXl2BGS5UvElJl8=";
})
];
}); |
Oh, a patch, that's cool. Here's the overlay that pulls in your PR commit, just because I already had it:
Perhaps better to use the patch, though. |
Wait, how do I use that? I'm actually trying to use
|
This so far seems to not crash? (Compiling is taking a while.) I figured that overriding the package in the overlay would get moveit to import the new version; quess I had to override it explicitly. # See: https://github.com/lopsided98/nix-ros-overlay/issues/311
self: super:
let
myOmpl = super.rosPackages.rolling.ompl.overrideAttrs ({ patches ? [ ], ... }: {
version="Fix patch";
patches = patches ++ [
# Use full install paths for pkg-config
(self.fetchpatch {
url = "https://github.com/hacker1024/ompl/commit/1ddecbad87b454ac0d8e1821030e4cf7eeff2db2.patch";
hash = "sha256-sAQLrWHoR/DhHk8TtUEy8E8VXqrvtXl2BGS5UvElJl8=";
})
];
});
in
{
rosPackages = super.rosPackages // {
rolling = super.rosPackages.rolling // {
ompl = myOmpl;
moveit-planners-ompl = super.rosPackages.rolling.moveit-planners-ompl.override { ompl = myOmpl; };
};
};
} Yup, this compiles! |
The patch is now applied in the overlay. |
Hi, unfortunately this flake doesn't build:
Here's my lockfile: flake.lock
It fails with this error:
The text was updated successfully, but these errors were encountered: