Pidgin: Difference between revisions

From NixOS Wiki
imported>Castilma
Include the solution from the old wiki.
Klinger (talk | contribs)
Beginning added and Category:Applications
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
If you want to use pidgin with the OTR plugin, you will find out, that installing the plugin with
Pidgin is a multi-protocol messaging client.
<code>nix-env -iA nixos.pidginotr</code>
does not work. The plugin doesn't appear in the plugin list.
To use it, you need to make a [https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides packageOverride].
There are two ways to do it.


== User local change ==
[https://pidgin.im/ Pidgin] is available in NixOS, as are many popular plugins such as pidgin-otr.
To make a change that only affects the current user, do this:


1. Put this into <code>~/.config/nixpkgs/config.nix</code>:
==Installing plugins==
<syntaxhighlight lang=nix>
NixOS provides Pidgin plugins as packages such as <tt>pidginotr</tt>, but installing them via <tt>nix-env</tt> or <tt>environment.systemPackages</tt> will not work. The plugin packages must be configured as part of the <tt>pidgin-with-plugins</tt> package via a package override.
{
 
===User-scope installation===
To install Pidgin with desired plugins only for the current user:
 
# In <code>~/.config/nixpkgs/config.nix</code>, add: <syntaxhighlight lang=nix>{
  ...
   packageOverrides = pkgs: rec {
   packageOverrides = pkgs: rec {
  pidgin-with-plugins = pkgs.pidgin-with-plugins.override {
    pidgin-with-plugins = pkgs.pidgin.override {
        plugins = [ pkgs.pidginotr ];};
      ## Add whatever plugins are desired (see nixos.org package listing).
      plugins = [ pkgs.pidgin-otr ];
    };
   };
   };
}
  ...
</syntaxhighlight>
}</syntaxhighlight>
 
# Install pidgin with <code>nix-env -iA nixos.pidgin-with-plugins</code>
2. Install pidgin with <code>nix-env -iA nixos.pidgin-with-plugins</code>.


== System wide change ==
===System-scope installation===
This solution fixes it for all users.
To install Pidgin with desired plugins for all users on the system:


1. extend systemPackages with the pidgin-with-plugins software:
# Amend <tt>/etc/nixos/configuration.nix</tt> to add <tt>pidgin-with-plugins</tt> to <tt>systemPackages</tt>: <syntaxhighlight lang=nix>{
<syntaxhighlight lang=nix>
  ...
environment.systemPackages = with pkgs; [
  environment.systemPackages = with pkgs; [
  pidgin-with-plugins
    pidgin-with-plugins
];
  ];
</syntaxhighlight>
  ...
 
}</syntaxhighlight>
2. afterwards you need to override the plugins directive with pidginotr like this:
# Override <tt>pidgin-with-plugins</tt> to add the desired plugins: <syntaxhighlight lang=nix>{
<syntaxhighlight lang=nix>
  ...
nixpkgs.config = {
  nixpkgs.config = {
  allowUnfree = true;
    allowUnfree = true;
  packageOverrides = pkgs: with pkgs; {
    packageOverrides = pkgs: with pkgs; {
    pidgin-with-plugins = pkgs.pidgin-with-plugins.override {
      pidgin-with-plugins = pkgs.pidgin.override {
      plugins = [ pidginotr ];
        ## Add whatever plugins are desired (see nixos.org package listing).
        plugins = [ pidgin-otr ];
      };
     };
     };
   };
   };
};
  ...
</syntaxhighlight>
}</syntaxhighlight>
 
# Run <tt>nixos-rebuild switch</tt> as root to apply changes.
<b>Note:</b> In order to affect your system by your nix-language-specific changes you have to evaluate it, run (as root):
<code>nixos-rebuild switch</code>
 
 
 
 
 


[[Category:Guide]]
[[Category:Applications]]

Latest revision as of 20:09, 19 April 2024

Pidgin is a multi-protocol messaging client.

Pidgin is available in NixOS, as are many popular plugins such as pidgin-otr.

Installing plugins

NixOS provides Pidgin plugins as packages such as pidginotr, but installing them via nix-env or environment.systemPackages will not work. The plugin packages must be configured as part of the pidgin-with-plugins package via a package override.

User-scope installation

To install Pidgin with desired plugins only for the current user:

  1. In ~/.config/nixpkgs/config.nix, add:
    {
      ...
      packageOverrides = pkgs: rec {
        pidgin-with-plugins = pkgs.pidgin.override {
          ## Add whatever plugins are desired (see nixos.org package listing).
          plugins = [ pkgs.pidgin-otr ];
        };
      };
      ...
    }
    
  2. Install pidgin with nix-env -iA nixos.pidgin-with-plugins

System-scope installation

To install Pidgin with desired plugins for all users on the system:

  1. Amend /etc/nixos/configuration.nix to add pidgin-with-plugins to systemPackages:
    {
      ...
      environment.systemPackages = with pkgs; [
        pidgin-with-plugins
      ];
      ...
    }
    
  2. Override pidgin-with-plugins to add the desired plugins:
    {
      ...
      nixpkgs.config = {
        allowUnfree = true;
        packageOverrides = pkgs: with pkgs; {
          pidgin-with-plugins = pkgs.pidgin.override {
            ## Add whatever plugins are desired (see nixos.org package listing).
            plugins = [ pidgin-otr ];
          };
        };
      };
      ...
    }
    
  3. Run nixos-rebuild switch as root to apply changes.