Merge pull request #327627 from SuperSandro2000/unoconv
unoconv: use python directly from libreoffice
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 ''
|
||||
|
||||
Reference in New Issue
Block a user