TL;DR add support for --srcOnly flag so install, setup don't compile binaries of hybrid packages
I rely on nimble setup (always in local mode) to fetch dependencies. But for none of the hybrid libraries I've used as dependencies have I ever needed the binaries those packages define/provide (for example karax).
I think it would be useful to offer this an opt-in feature for those cases when users are aware they are installing a hybrid package and have no need for the binary.
Relatedly, I maintain a nix flake that is based on nimble and ingesting nimble.lock files. In this case the compiled outputs are noise that at best consume disk space and at worst a possible failure mode given the build system quirks of nix when they are likely not relied on for a package that is using libraries as a dependency.
Granted nix problems are not nimble's problems but I still think this QOL feature would be useful when developing and installing dependencies.
To avoid this problem for my own hybrid packages I've taken to defining binaries in a subdirwith their own .nimble to keep library installation limited to src files.
I am not aware of any library that requires both its src and binary to function as a library but I imagine there is a way to do that using after install tasks. And if you give folks the ability to something they are sure to find a way, so maintaining the current behavior with an explicit option to disable it seems safer.
TL;DR add support for
--srcOnlyflag soinstall,setupdon't compile binaries of hybrid packagesI rely on
nimble setup(always in local mode) to fetch dependencies. But for none of the hybrid libraries I've used as dependencies have I ever needed the binaries those packages define/provide (for examplekarax).I think it would be useful to offer this an opt-in feature for those cases when users are aware they are installing a hybrid package and have no need for the binary.
Relatedly, I maintain a
nixflake that is based onnimbleand ingestingnimble.lockfiles. In this case the compiled outputs are noise that at best consume disk space and at worst a possible failure mode given the build system quirks of nix when they are likely not relied on for a package that is using libraries as a dependency.Granted
nixproblems are notnimble's problems but I still think this QOL feature would be useful when developing and installing dependencies.To avoid this problem for my own hybrid packages I've taken to defining binaries in a
subdirwith their own.nimbleto keep library installation limited to src files.I am not aware of any library that requires both its src and binary to function as a library but I imagine there is a way to do that using
after installtasks. And if you give folks the ability to something they are sure to find a way, so maintaining the current behavior with an explicit option to disable it seems safer.