Osrm-backend doesn't seem to provide osrm-extract

I’m trying to set up osrm-backend following the instructions here. It uses commands such as osm-extract, but even though I have osrm-backend installed, I don’t have the command available. Is there something else I must install? This is what I have. (The service is failing, of course.)

{
  environment.systemPackages = with pkgs; [
    osrm-backend osmium-tool libosmium
  ];
  services = {
    osrm = {
      enable = true;
      dataFile = "/var/lib/osrm/new-mexico-latest.osm";
    };
  };
}

osrm-extract should be available in your path as it’s indeed part of osrm-backend.

osm-extract

Do you have a typo there maybe?

1 Like

Thanks for pointing me in the right direction. It wasn’t a typo, but turned out to be a PATH issue. A newshell made them appear.

Edit:

The instructions suggest that the profiles directory is a sub-directory of the working directory. I had to fd car.lua in the nix store to find the profiles directory, which I then symlinked to /var/lib/osrm for processing.

1 Like