From 41ccef4a0fbc5c3eceb36a9e4e18bbf868289187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 16 Jul 2024 13:32:46 +0200 Subject: [PATCH 1/2] libreoffice: passthru python version --- pkgs/applications/office/libreoffice/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix index b6dd98d4cae1..1a0eaeeeb544 100644 --- a/pkgs/applications/office/libreoffice/default.nix +++ b/pkgs/applications/office/libreoffice/default.nix @@ -562,6 +562,7 @@ in stdenv.mkDerivation (finalAttrs: { passthru = { inherit srcs; jdk = jre'; + python = python311; # for unoconv updateScript = [ ./update.sh # Pass it this file name as argument From 0e4442adf0ee0e5d98483fb0f1dbae8026770843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 16 Jul 2024 13:32:54 +0200 Subject: [PATCH 2/2] unoconv: use python directly from libreoffice --- pkgs/tools/text/unoconv/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/text/unoconv/default.nix b/pkgs/tools/text/unoconv/default.nix index 66f8fd2a6509..490b961f9710 100644 --- a/pkgs/tools/text/unoconv/default.nix +++ b/pkgs/tools/text/unoconv/default.nix @@ -1,11 +1,8 @@ -{ lib, stdenv, fetchFromGitHub, python3, libreoffice-unwrapped, asciidoc, makeWrapper +{ lib, stdenv, fetchFromGitHub, libreoffice-unwrapped, asciidoc, makeWrapper # whether to install odt2pdf/odt2doc/... symlinks to unoconv , installSymlinks ? true }: -# IMPORTANT: unoconv must use the same python version as libreoffice (unless it -# will not be able to load the pyuno module from libreoffice). - stdenv.mkDerivation rec { pname = "unoconv"; version = "0.9.0"; @@ -24,7 +21,7 @@ stdenv.mkDerivation rec { ''; postInstall = '' - sed -i "s|/usr/bin/env python.*|${python3}/bin/${python3.executable}|" "$out/bin/unoconv" + sed -i "s|/usr/bin/env python.*|${libreoffice-unwrapped.python.interpreter}|" "$out/bin/unoconv" wrapProgram "$out/bin/unoconv" \ --set-default UNO_PATH "${libreoffice-unwrapped}/lib/libreoffice/program/" '' + lib.optionalString installSymlinks ''