error: externally-managed-environment
× This environment is externally managed
╰─> This command has been disabled as it tries to modify the immutable
`/nix/store` filesystem.
I am using home-manager and flakes. Is there an alternative solution to install this package?
OK. Thanks very much for that. Unfortunately, it’s just a bit beyond me to implement. Too many concepts are still too foreign to me for this to make sense.
Thanks for this. I think it worked as you intended. wallabag-client installed properly and seems to work. But it seems to be limited to this virtual environment that you had me set up.
I want to be able to call wallabag-client from within my browser, so it needs to always be available. How can I achieve that?
This project does the same thing, but includes a binary. I tried running the binary and got this:
Could not start dynamically linked executable: ./wallabag
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
pipx is a good solution here. (add pipx to home.packages)
the other nix specific solution would be to write package derivation for these repos and callPackage them in your home-manager and add those to home.packages.
The “easy” way is to package it so that it continues to work going forward. Using pip, etc. will risk breakages.
I second the nix-init recommendation to create a package expression (say, mypackage.nix) then you can add it to some package list (pkgs.callPackage ./path/to/mypackage.nix {}).
If you’re stuck at that point, you’re welcome to ask.
Yeah, I should had prefaced my recommendation with “pipx is an easy button but will most likely break the installed package at some point”. When (not if) that happens, you could just reinstall the wallabag client package, assuming you add pipx to your Nix packages. By “breaking” I don’t mean anything catastrophic, but rather python will most likely complain about a missing module and refuse to do anything.
True, but stick around – it’s worth it
@waffle8946 , you are not wrong, that would be the most stable solution and, hey, one that could even be contributed back to nixpkgs.
However I (as respectfully as possible ) disagree with making such recommendation in the context of this thread.
IMHO writing one’s first nix package expression is not easy at all; especially when they are also hitting that first cliff of the learning curve
I would never claim it’s easy, but this is a help forum, we should be here to help.
And this beginner stage is exactly where it is most appropriate to point out that the correct way to run programs on NixOS is to package them - otherwise people come away with the belief that NixOS is somehow “broken” rather than a result of using the tools incorrectly.
Besides, nix-init actually does get you 90% of the way there (depending on the ecosystem, python here is well supported). And python is well-known in the community, so they will get answers if they ask, it’s not like I’m telling them to go package something in some obscure language.
There really is no “easy way”, and what you mean is perhaps more like “familiar way”.
This is why I put that wiki link first: NixOS is different from other distributions, and our approaches to problems are different.
I would recommend considering this as a great opportunity to learn how to do things in the “Nix” way.