Hello, I would like to understand what it would ta...
# general
a
Hello, I would like to understand what it would take to build and package pants for Nix(OS). Where would the best place be to start this conversation?
w
I feel like in Slack Nix has been brought up a lot, but as a nix outsider I'm never really understanding whether the discussions are related to running pants on nix itself, or publishing something for nix. In any event, there was a GH Discussion here: https://github.com/pantsbuild/pants/discussions/19537 There are some (maybe?) relevant PRs re: nix backend, and another about developing Pants using the nix package manager: https://github.com/pantsbuild/pants/pulls?q=is%3Apr+nix Then, of course, adhoc slack conversations. My guess would be a new GH Discussion if the existing one isn't appropriate
And, while I might be speaking out of turn here, my guess is that any perceived lack of movement on the Nix front is due to not a lot of Nix + Pants users - rather than any disagreement on better Nix + Pants integration 🤷
s
I tried building science (a-scie/lift) first, but then at runtime it downloads even more stuff like python-build-standalone, etc. so I gave up on scie-lift and I'm working on packaging the raw pants repo: https://github.com/grihabor/dotfiles/blob/master/nix/.config/home-manager/pants/pants.nix I think the major problem is that pants can launch different versions of itself by design, so it's not clear how to package it with something as rigid as nix. Eventually it might be another pants launcher for nix that would search for the specific pants version in the nix store
w
Oof, that's wrinkling my brain
a
Thanks, I saw that issue - seems like the discussion seems to be more about producing Nix artifacts, which is secondary to this IMO. The things that Pants tries to do to isolate itself in nice ways (scie, py-build-standalone, pex, etc) are nice for all other OSes where there's chaotic environments. Since Nix already takes care of the precise environment management, I feel like these layers need to be stripped away since they provide no value when running on Nix. @square-psychiatrist-19087 I think what you're doing is a step in the right direction. Have you gotten pants from that derivation running? (going to try it myself now, appreciate you putting it together)
It would probably be best to make pants re-entrant depending on OS/platform. Would be nice to have a "raw" way to just launch it and have it expect things in certain places
s
I have native_engine.so and native_client built, but the python package is not ready yet
🙏 1