Hello,
I have been trying setup my development PC to run on NixOS. I’ve gotten 95% of everything working very easily. I am running into issues with some scripts/interpreted apps I’ve written though.
For example, I have a small application written in Ruby that uses Xlib to capture hotkey presses and perform actions on windows. It connects to Xlib through Ruby’s FFI and the ‘xlib’ gem. Building it as a package is fairly simple using bunder/bundix, and it installs just fine. The problem is that when it’s installed and run through nix, it fails as soon as it tries to call any xlib functions.
I’m struggling to figure out how to require xlib and expose it’s libraries to Ruby at runtime.
It seems that Nix is awesome for dealing with static applications, but it gets more difficult when dealing with interpreted dynamic applications which don’t have clear dependencies. On a production system this isn’t a big deal since generally such dynamic applications are avoided, but in a development environment, it’s nice to get away with more laziness so that things can change more rapidly.
I’ve been tempted to start running some things in Docker, or possibly install Gentoo’s portage in my user directory which is frustrating because it defeats the purpose of running NixOS.