4 ms·
It's picosnitch, if you know what I'm doing wrong/how to fix it that'd be great! It depends on bcc and psutil, and I am able to build and run it from a .nix fil
by elesiuta 4y ago
It's picosnitch, if you know what I'm doing wrong/how to fix it that'd be great! It depends on bcc and psutil, and I am able to build and run it from a .nix file using python3.pkgs.fetchPypi with
nix-build -E 'with import <nixpkgs> {}; callPackage ./picosnitch.nix {}'
sudo -E ./result/bin/picosnitch start-no-daemon
However, when I run it with just start, it can no longer find psutil and bcc. It uses a daemon class here [1].
I also encounter the same issue when running it without sudo, since it will re-execute itself here [2].
It can also use systemd, but I didn't get around to figuring out how to use systemd and install the service file on nix (I've never used nix before and know very little).
[1] https://github.com/elesiuta/picosnitch/blob/master/picosnitch.py#L116 https://github.com/elesiuta/picosnitch/blob/master/picosnitc...
[2] https://github.com/elesiuta/picosnitch/blob/master/picosnitch.py#L1834 https://github.com/elesiuta/picosnitch/blob/master/picosnitc...
- otabdeveloper4 4y agoAll nix packages are self-contained ("portable" in Windows parlance), programs don't get a default working PATH. You need to craft PATH yourself, usually using wrapProgram.
- elesiuta 4y agoThanks! I didn't know about wrapProgram, that sounds exactly like what I need.
- pxc 4y agoIf you run into new issues with the package in trying to leverage wrapProgram, feel free to open a thread on discourse.nixos.org and also to @ me there! Picosnitch seems like a nifty utility and it's awesome that you've taken up that packaging effort to make your work more available for users of so many distros. :)
- elesiuta 4y agoThank you for the kind words and your offer! I did run into some new issues so I'll be taking you up on it shortly.