Jump to content

Calibre: Difference between revisions

From Official NixOS Wiki
Railwhale (talk | contribs)
m switch RAR Wikipedia link to shorthand as well
Fyrk (talk | contribs)
Fix Wikipedia link
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[https://calibre-ebook.com/ Calibre] is program to view, edit, convert and print ebooks.
[https://calibre-ebook.com/ Calibre] is program to view, edit, convert, and print ebooks.


== Installation ==
== Installation ==


Calibre is available in [[nixpkgs]] as {{nixos:package|calibre}}.
Calibre is available in [[nixpkgs]] as {{nixos:package|calibre}}.
=== Testing ===
You can test Calibre without installing it by using a nix shell.
==== Flakes ====
If you have [[flakes]] enabled, you can run this command to enter a temporary shell with Calibre available:
<syntaxhighlight lang="bash">
nix shell nixpkgs#calibre
</syntaxhighlight>
==== Non-flakes ====
Without flakes, use this command to open a temporary shell with Calibre available:
<syntaxhighlight lang="bash">
nix-shell -p calibre
</syntaxhighlight>


=== NixOS ===
=== NixOS ===
Line 53: Line 33:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.udisks2.enable = true;
services.udisks2 = {
    enable = true;
    mountOnMedia = true;
};
</syntaxhighlight>
</syntaxhighlight>


Line 80: Line 63:


== See also ==
== See also ==
* [[Wikipedia:Calibre|Calibre on Wikipedia]]
* [[wikipedia:Calibre_(software)|Calibre on Wikipedia]]


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

Latest revision as of 09:40, 2 May 2026

Calibre is program to view, edit, convert, and print ebooks.

Installation

Calibre is available in nixpkgs as calibre.

NixOS

Add the package to your NixOS configuration, in environment.systemPackages:

environment.systemPackages = with pkgs; [
  calibre
];

Home Manager

Add the package to your home.packages:

home.packages = with pkgs; [      
  calibre
];


Extras

Connecting USB devices

To connect devices via USB, you might have to add the following to your NixOS configuration:

services.udisks2 = {
    enable = true;
    mountOnMedia = true;
};

Opening .cbr files

.cbr files are comic book archives in the RAR archive format.

If you want to open .cbr files, replace calibre with the following in your NixOS or Home Manager configuration:

(calibre.override {
  unrarSupport = true;
})
Note: calibre requires unrar to open .cbr files, which is an unfree package. This also causes calibre to be marked as unfree. If you are using allowUnfreePredicate you will need to ensure that your configurations permit all of them.

For example, you can add this snippet to your NixOS configuration to allow calibre and unrar.

nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
  "calibre"
  "unrar"
];

See also