feat(calibre): move calibre into wrapper

This commit is contained in:
Nydragon 2024-06-15 21:50:51 +09:00
parent d0e1179dcb
commit 19ac2143f2
No known key found for this signature in database
GPG key ID: 14AA30A865EA1209
3 changed files with 16 additions and 12 deletions

View file

@ -16,10 +16,12 @@
inherit (self) outputs; inherit (self) outputs;
system = "x86_64-linux"; system = "x86_64-linux";
overlays = import ./overlays;
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
overlays = [ overlays.calibre ];
}; };
lib = nixpkgs.lib; lib = nixpkgs.lib;

View file

@ -89,6 +89,7 @@ rec {
protonmail-bridge-gui protonmail-bridge-gui
varia varia
signal-desktop signal-desktop
calibre
# Proprietary # Proprietary
postman postman
@ -115,18 +116,7 @@ rec {
nixedit nixedit
]; ];
in in
scripts scripts ++ pk;
++ pk
++ [
(pkgs.calibre.overrideAttrs (old: {
postInstall = ''
wrapProgram $out/bin/calibre \
--set QT_QPA_PLATFORM xcb \
--set-default ACSM_LIBCRYPTO ${pkgs.openssl.out}/lib/libcrypto.so \
--set-default ACSM_LIBSSL ${pkgs.openssl.out}/lib/libssl.so
'';
}))
];
sessionVariables = { sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";

12
overlays/default.nix Normal file
View file

@ -0,0 +1,12 @@
{
calibre = final: prev: {
calibre = prev.calibre.overrideAttrs (old: {
postInstall = ''
wrapProgram $out/bin/calibre \
--set QT_QPA_PLATFORM xcb \
--set-default ACSM_LIBCRYPTO ${prev.openssl.out}/lib/libcrypto.so \
--set-default ACSM_LIBSSL ${prev.openssl.out}/lib/libssl.so
'';
});
};
}