Unregistered manifest pointing to fork of library?

I need to use the FreematicsOne library, which is developed in the “firmware_v4/libraries/FreematicsONE” subdirectory at GitHub - stanleyhuangyc/Freematics: Official source code repository for Freematics. I created FreematicsONE/library.json at master · lalten/FreematicsONE · GitHub which points to the Freematics repository and “includes” the correct subdirectory as per the library finder docs. I registered this manifest and now it shows up at in the PlatformIO registry. So far so good.

Now I want to fork the library. How do I point my platformio.ini “libs” at this fork? I can’t use the fork’s repository URL because I need to keep the “include” directive from the manifest.
Can I have a local library manifest that is not in the registry that points to the fork or a directory on my hard drive?

Could you try the next?

$ cd /to/platformio/project
$ pio lib install https://github.com/stanleyhuangyc/Freematics.git

Now, in platformio.ini

[env:myenv]
board = ..
...
lib_extra_dirs = .piolibdeps/Freematics/firmware_v4/libraries

This kind of works, thank you for the workaround and sorry for the late reply.

Why doesn’t it work when I use these lines in the platformio.ini?

lib_deps = https://github.com/stanleyhuangyc/Freematics.git
lib_extra_dirs = .piolibdeps/Freematics/firmware_v4/libraries

It will give me a fatal error: FreematicsONE.h: No such file or directory even though the library is there in the .piolibdeps…

It should work. Do you see this folder .piolibdeps/Freematics/firmware_v4/libraries?