[Solved] Access to absolute path is forbidden in restricted mode (Ofborg)

I am currently trying to package audiobookshelf (audiobookshelf: init at 2.2.12 by jvanbruegge · Pull Request #213265 · NixOS/nixpkgs · GitHub), but for some reason ofborg is yelling at me: Output path comparison · GitHub

This is not the first package I created, but I have no idea what is different this time compared to the other ones. It builds locally just fine.

1 Like

this line looks … slightly illegal. but other node-deps.nix look similar, might be a problem with node2nix. may try recreating your package from somewhere deeper in your filesystem hierarchy to add extra ../ components for ofborg :grimacing:

Ok found the solution. Apparently you can work around this:

  nodeDeps = (import ./node-composition.nix {
    inherit pkgs nodejs;
    inherit (stdenv.hostPlatform) system;
  }).nodeDependencies.override (old: {
    # access to path '/nix/store/...-source' is forbidden in restricted mode
    inherit src;
  });

Found that in the sources for Jellyfin