|
|
#1 |
|
Junior Member
![]() 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?
|
|
|
|
|
|
#2 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,518
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?
|
|
|
|
|
|
#3 |
|
Weirdo
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,419
Karma: 13580110
Join Date: Nov 2019
Location: Wuppertal, Germany
Device: Kobo Clara BW, Tolino Shine Color, Kindle 2026, reMarkable PaperPro
|
|
|
|
|
|
|
#4 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
|
|
|
|
|
#5 |
|
Junior Member
![]() 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!
|
|
|
|
|
|
#6 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,584
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You are welcome!
|
|
|
|
|
|
#7 | |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2025
Device: kindle
|
Quote:
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;
});
})
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! |
|
|
|
|
|
|
#8 |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2025
Device: kindle
|
Code:
--set-default FONTCONFIG_FILE ${final.camoufox}/bin/fonts.conf
|
|
|
|
|
|
#9 |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Aug 2020
Device: Kindle Paperwhite
|
calibre is adding spyware
|
|
|
|
|
|
#10 |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2025
Device: kindle
|
|
|
|
|
|
|
#11 |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Aug 2020
Device: Kindle Paperwhite
|
why is it adding a start menu item to windows 11?
|
|
|
|
|
|
#12 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,901
Karma: 34252744
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
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 |
|
|
|
|
|
#13 |
|
Member
![]() 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 |
|
|
|
|
|
#14 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. If nothing like, then tell us what it is. BR Last edited by BetterRed; Today at 03:54 PM. |
|
|
|
|
|
#15 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 55,570
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. |
|
|
|
![]() |
| Tags |
| calibre, nixos, tech support |
|
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 |