psych3r / driverkit

Minimal rust wrapper for Karabiner-DriverKit-VirtualHIDDevice
2 stars 4 forks source link

Builds on Nix fail due to os_info::get().version() #3

Open alexandru0-dev opened 2 months ago

alexandru0-dev commented 2 months ago

As the title says builds on nix fail due to build.rs using conditional includes. When building with Nix, os_info::get().version() returns Unknown which is cannot be deserialized to Sematic resulting in missing includes and build failues. Original comment

Possible solution:

Using feature flags would be ideal and using the current method (dynamic builds) as a fallback.


Also sidenote: Shouldn't those lines contain c_src only 1 time? https://github.com/psych3r/driverkit/blob/1b552cc9a0d60003605f2a69f2c2c3b46cacfc71/build.rs#L31-L32

psych3r commented 2 months ago

@alexandru0-dev I don't know much about NixOS but isn't it linux based? Why should it build on macOS? driverkit is built with only macOS in mind...

alexandru0-dev commented 2 months ago

@psych3r Nixos is a linux distro based on nix Nix is a language/package manager

My bad about the link, probably this is a better explanation of what nix is https://nixos.org/guides/how-nix-works/

Nix is also capable of building darwin (macOS) packages

alexandru0-dev commented 1 month ago

@psych3r any updates on this issue?