1

https://calibre-ebook.com/download_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- https://download.calibre-ebook.com/linux-installer.sh | 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.)

Thanks.

1
  • 1
    IDK NixOS, but you can (and should always) wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh >linux-installer.sh, and inspect, understand, modify this local copy before granting it full access to your system with sudo sh ./linux-installer.sh. Downloading and piping to sudo sh is Very Risky. It's like giving a stranger in a hat your house keys while you go to the store. Pobably the stranger will do the right thing. Probably.
    – waltinator
    Oct 26, 2023 at 23:58

1 Answer 1

2

On NixOS you'll want to install the package from nixpkgs, either temporarily by running nix-shell -p calibre or permanently by adding pkgs.calibre to environment.systemPackages in /etc/nixos/configuration.nix. If you really want a custom installation I'd recommend having a look at the nixpkgs packaging script.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .