3 ms·
> Unless you can tell me how to somehow modify the installation of Weechat to also include this one Python package. pkgs.weechat.override { extraBuildInput
by pxc 5y ago
> Unless you can tell me how to somehow modify the installation of Weechat to also include this one Python package.
pkgs.weechat.override { extraBuildInputs = [ pkgs.python3Packages.pync ]; };
};
That Nix expression defines a package meaning 'just like Weechat, but with pync in the build paths'. There are examples with links to more docs on the unofficial NixOS wiki: https://nixos.wiki/wiki/Weechat https://nixos.wiki/wiki/Weechat
Looking at the Nixpkgs docs, you might prefer a different override expression. Several examples are provided: https://nixos.org/manual/nixpkgs/stable/#sec-weechat https://nixos.org/manual/nixpkgs/stable/#sec-weechat
I understand that this may still feel like 'making a simple thing hard', but it does, I hope, answer your question. Modifying existing packages in just a few lines of code in order to include additional dependencies is very much part of Nix's paradigm. :)
There's a way you could write all that inline to install it with nix-env, too, but I can't be arsed.
- gpanders 5y agoThanks. I am not sure how I missed that section in the manual that answers my exact question… I will give that a try!
- pxc 5y agoNo problem! Once you apply the override concept with Weechat, you'll have a feel for what is a very general suite of customization mechanisms in Nixpkgs. That'll be unlikely to miss a similar opportunity with other packages. NixOS Discourse is a great place to clear stumbling blocks like these, by the way :) https://discourse.nixos.org https://discourse.nixos.org
- gpanders 5y agoThis worked! Although I ran into another problem with pync itself, which led me to open my first PR with nixpkgs [1]. Thanks for convincing me to give it another shot! [1]: https://github.com/NixOS/nixpkgs/pull/130402 https://github.com/NixOS/nixpkgs/pull/130402