How can this binary install be done in NixOS?

calibre - Download for Linux says

calibre has a binary install that includes private versions of all its
dependencies. It runs on 32-bit and 64-bit Intel compatible machines.
To install or upgrade, simply copy paste the following command into a
terminal and press Enter:

sudo -v && wget -nv -O- | sudo sh /dev/stdin

I was wondering what modification needs to be done on the command, when installing the binary on NixOS,

  • if I want the minimal modification, OR
  • if I want the maximal conformation with NixOS’ own ways of package installation, OR
  • if I want the maximal scope (e.g. user environment wide, system wide) of running the binary once installed.

(I use “OR” because I am not sure if they could all be accomplished at the same time, and it is helpful if I know those ways for different purposes, just for future reference.)


Just to clarify, running the calibre that is already packaged in nixpkgs is not an option?

for running naive non-nixos binaries, you could try something nix-alien, or nix-ld.

The Calibre package from nixos 22.05 channel misses some pages when converting epub to pdf.

The link of Calibre also warns that

“Please do not use your distribution provided calibre package, as those are often buggy/outdated. Instead use the Binary install described below.”

Could you elaborate how to use nix-alien or nix-ld for installing the Calibre binarie?

22.05 reached EOL 10 months ago. You should upgrade instead. The Calibre package from nixos-unstable channel is up to date.

1 Like