Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 09:55 AM   #1
cranetoad
Junior Member
cranetoad began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2025
Device: kindle
Has anyone got camoufox working on calibre Nixos?

As the title: has any of you an idea how to get Calibre's camoufox to work on Nixos? Mine complains that there is no browserforge, which is probably some nix store weirdness, but wanted to see if anyone has resolved this already. Is it possible to provide local version of camoufox to Calibre?
cranetoad is offline   Reply With Quote
Old Yesterday, 10:05 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 85,521
Karma: 154365185
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Why is it some run such obscure odd versions of Linux and then wonder why things break?
JSWolf is online now   Reply With Quote
Old Yesterday, 10:13 AM   #3
rantanplan
Weirdo
rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.
 
Posts: 1,419
Karma: 13580110
Join Date: Nov 2019
Location: Wuppertal, Germany
Device: Kobo Clara BW, Tolino Shine Color, Kindle 2026, reMarkable PaperPro
Quote:
Originally Posted by JSWolf View Post
Why is it some run such obscure odd versions of Linux and then wonder why things break?
Their problem is not Calibre. Camoufox is something to use to avoid bot-detection for browsers.
rantanplan is offline   Reply With Quote
Old Yesterday, 10:24 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,584
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes it's to use a local camoufox, the nixos package of calibre has to be modified to build with ./setup.py resources --system-camoufox
kovidgoyal is offline   Reply With Quote
Old Yesterday, 11:01 AM   #5
cranetoad
Junior Member
cranetoad began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2025
Device: kindle
Thank you kovidgoyal, now I know what todo. Just as an aside, I love all your work, I've been using calibre and kitty for years!
cranetoad is offline   Reply With Quote
Old Yesterday, 11:12 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,584
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You are welcome!
kovidgoyal is offline   Reply With Quote
Old Today, 04:27 AM   #7
cranetoad
Junior Member
cranetoad began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2025
Device: kindle
Quote:
Originally Posted by JSWolf View Post
Why is it some run such obscure odd versions of Linux and then wonder why things break?
Nixos isn't exactly obscure, but more in use with developers. My intent was to ask whether someone had already patched Calibre so I wouldn't do the same work someone has already done. Kovidgoyal was kind enough to point me in the right direction, and just in case someone else comes looking, here is what I did:

A system installation of camoufox and injecting browserforge to Calibre PYTHON_PATH does the trick, and is easily achievable by using an overlay. For Camoufox, I used the flake from here and installed system-wide: https://github.com/maximoffua/camoufox-nix. Just pick and choose what you need from there.

Then I created the overlay:

Code:
(final: prev: {
      calibre = prev.calibre.overrideAttrs (old:
      {
        buildInputs = old.buildInputs ++ [final.camoufox final.python314Packages.browserforge];

        postPatch =
          (old.postPatch or "")
          + ''
            unwrapped=$(grep -o '/nix/store/[^/"]*camoufox-unwrapped[^/"]*' ${final.camoufox}/bin/camoufox | head -n1)
            test -n "$unwrapped" || { echo "could not find unwrapped camoufox"; exit 1; }

            substituteInPlace setup/resources.py \
              --replace-fail "if not opts.system_camoufox:" "if False:" \
              --replace-fail "parts = opts.system_camoufox.split(os.pathsep)" "parts = '$unwrapped/bin/camoufox:$unwrapped/lib/camoufox'.split(os.pathsep)"
          '';
        preFixup =
          ''
            qtWrapperArgs+=(
              --set-default FONTCONFIG_FILE ${final.camoufox}/bin/fonts.conf
              --prefix PYTHONPATH : ${final.python314Packages.makePythonPath [final.python314Packages.browserforge]}
              --prefix LD_LIBRARY_PATH : ${final.lib.makeLibraryPath [
              final.gtk3
              final.glib
              final.dbus-glib
              final.libGL
              final.libxkbcommon
              final.alsa-lib
              final.libpulseaudio
              final.pciutils
              final.xorg.libX11
              final.xorg.libXtst
              final.xorg.libXrandr
              final.xorg.libXcomposite
              final.xorg.libXdamage
              final.xorg.libXfixes
              final.xorg.libXcursor
              final.xorg.libXi
              final.xorg.libxcb
              final.wayland
            ]}
            )
          ''
          + old.preFixup;
      });
    })
I'm not entirely sure if Calibre needs camoufox and browserforge as buildInputs, but I started by adding them, and never got to testing without, they are harmless if not used.

The hacky grep-based substitution is because I had problems with python whitespace inside nix and my formatter destroying the whitespace, so instead of elegant, you get hacky. It works 😅.

qtWrapper adds the run-time dependencies to calibre. e.g. browserforge and camoufox fonts, and also the libraries that camoufox might need. The libraries probably could be whittled down, if you are inclined to test.

If someone has done something prettier, feel free to share!
cranetoad is offline   Reply With Quote
Old Today, 05:35 AM   #8
cranetoad
Junior Member
cranetoad began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2025
Device: kindle
Code:
 --set-default FONTCONFIG_FILE ${final.camoufox}/bin/fonts.conf
is actually unnecessary, and messes up calibre fonts for no gain. I'm not sure whether omitting camoufox fonts from the environment causes problems with fingerprinting resistance, but my eyes are not bleeding anymore, so I take what I can get ��
cranetoad is offline   Reply With Quote
Old Today, 09:33 AM   #9
buellie
Member
buellie began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Aug 2020
Device: Kindle Paperwhite
calibre is adding spyware
buellie is offline   Reply With Quote
Old Today, 10:07 AM   #10
cranetoad
Junior Member
cranetoad began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2025
Device: kindle
Quote:
Originally Posted by buellie View Post
calibre is adding spyware
I'm pretty sure it's not. What do you mean?
cranetoad is offline   Reply With Quote
Old Today, 12:20 PM   #11
buellie
Member
buellie began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Aug 2020
Device: Kindle Paperwhite
why is it adding a start menu item to windows 11?
buellie is offline   Reply With Quote
Old Today, 01:04 PM   #12
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 22,901
Karma: 34252744
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by buellie View Post
why is it adding a start menu item to windows 11?
Because you did not tell it not to at install time

When you do the install, after agreeing to the License terms, there's an Advanced button, in there you'll see options regarding Start menu, desktop shortcuts etc.

BR
BetterRed is offline   Reply With Quote
Old Today, 03:36 PM   #13
buellie
Member
buellie began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Aug 2020
Device: Kindle Paperwhite
there was no install, i have been using the portable version since version 4.
when the update in the corner shows up i update.
i click on the download and it just runs
when its finished it asks if i want to start calibre.

spyware
buellie is offline   Reply With Quote
Old Today, 03:51 PM   #14
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 22,901
Karma: 34252744
Join Date: Mar 2012
Location: Sydney Australia
Device: none
What do the Start menu shortcuts target?

If its anything like the following you must have installed the regular Windows version at some time.

Click image for larger version

Name:	Screenshot 2026-11-05 064428.jpg
Views:	6
Size:	167.2 KB
ID:	227179

If nothing like, then tell us what it is.

BR

Last edited by BetterRed; Today at 03:54 PM.
BetterRed is offline   Reply With Quote
Old Today, 04:08 PM   #15
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 55,576
Karma: 182544312
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For what it may add to the confusion, after calibre installed camoufox, I did get a Start Menu shortcut. See attached image.

OTOH, there was a message from @buellie in a thread started by another person in the Introduce Yourself subforum complaining about notificationserver.dll located in the calibre-dbin/camoufox/158.0.1-beta.41 directory as being malware despite no tools that I used showing any indication of such. Hmmm... Just noticed that message has been either deleted or moved without a redirect.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2026-11-04 125454.png
Views:	6
Size:	150.4 KB
ID:	227180  
DNSB is online now   Reply With Quote
Reply

Tags
calibre, nixos, tech support


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Camoufox in Metadata Download Plugin Bradles Development 1 10-23-2026 11:45 PM
I'm working on a new calibre library app - Calibre LibraLink setherd LibriLink for Calibre 77 04-17-2026 08:23 PM
calibre-3.16.0 not working on my PC meanna127 Calibre 2 02-03-2018 05:44 PM
Calibre Sync on Android stopped working properly with recent version of Calibre? khahoon Calibre 5 07-06-2013 09:14 AM
Calibre not working right for me Klippy Calibre 0 02-23-2013 01:28 AM


All times are GMT -4. The time now is 06:00 PM.


MobileRead.com is a privately owned, operated and funded community.