From 19ac2143f2f6fc335ef747574932780f22816c91 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Sat, 15 Jun 2024 21:50:51 +0900 Subject: [PATCH] feat(calibre): move calibre into wrapper --- flake.nix | 2 ++ home/default.nix | 14 ++------------ overlays/default.nix | 12 ++++++++++++ 3 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 overlays/default.nix diff --git a/flake.nix b/flake.nix index 60956c9..f830bd0 100644 --- a/flake.nix +++ b/flake.nix @@ -16,10 +16,12 @@ inherit (self) outputs; system = "x86_64-linux"; + overlays = import ./overlays; pkgs = import nixpkgs { inherit system; config.allowUnfree = true; + overlays = [ overlays.calibre ]; }; lib = nixpkgs.lib; diff --git a/home/default.nix b/home/default.nix index 94a4116..de5d038 100644 --- a/home/default.nix +++ b/home/default.nix @@ -89,6 +89,7 @@ rec { protonmail-bridge-gui varia signal-desktop + calibre # Proprietary postman @@ -115,18 +116,7 @@ rec { nixedit ]; in - scripts - ++ 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 - ''; - })) - ]; + scripts ++ pk; sessionVariables = { EDITOR = "nvim"; diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..913fefb --- /dev/null +++ b/overlays/default.nix @@ -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 + ''; + }); + }; +}