forked from mirrors/nixpkgs
libreoffice: Fix invalid desktop files
Fixes a regression introduced in #219166 by again setting the correct binary name in the Exec filed for the .desktop files. Fixes #220693
This commit is contained in:
parent
5caffb85f6
commit
7d15a39781
|
@ -154,6 +154,7 @@ let
|
||||||
mkDrv = if kdeIntegration then mkDerivation else stdenv.mkDerivation;
|
mkDrv = if kdeIntegration then mkDerivation else stdenv.mkDerivation;
|
||||||
|
|
||||||
srcs = {
|
srcs = {
|
||||||
|
primary = primary-src;
|
||||||
third_party =
|
third_party =
|
||||||
map (x: ((fetchurl { inherit (x) url sha256 name; }) // { inherit (x) md5name md5; }))
|
map (x: ((fetchurl { inherit (x) url sha256 name; }) // { inherit (x) md5name md5; }))
|
||||||
(importVariant "download.nix" ++ [
|
(importVariant "download.nix" ++ [
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (unwrapped.srcs.primary) major minor;
|
||||||
|
|
||||||
makeWrapperArgs = builtins.concatStringsSep " " ([
|
makeWrapperArgs = builtins.concatStringsSep " " ([
|
||||||
"--set" "GDK_PIXBUF_MODULE_FILE" "${librsvg}/${gdk-pixbuf.moduleDir}.cache"
|
"--set" "GDK_PIXBUF_MODULE_FILE" "${librsvg}/${gdk-pixbuf.moduleDir}.cache"
|
||||||
"--prefix" "GIO_EXTRA_MODULES" ":" "${lib.getLib dconf}/lib/gio/modules"
|
"--prefix" "GIO_EXTRA_MODULES" ":" "${lib.getLib dconf}/lib/gio/modules"
|
||||||
|
@ -86,8 +88,18 @@ in runCommand "${unwrapped.name}-wrapped" {
|
||||||
};
|
};
|
||||||
} (''
|
} (''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
ln -s ${unwrapped}/share $out/share
|
mkdir -p "$out/share"
|
||||||
|
|
||||||
|
ln -s ${unwrapped}/share/icons $out/share/icons
|
||||||
|
ln -s ${unwrapped}/share/templates $out/share/templates
|
||||||
ln -s ${unwrapped}/lib $out/lib
|
ln -s ${unwrapped}/lib $out/lib
|
||||||
|
|
||||||
|
cp -r ${unwrapped}/share/applications/ $out/share/
|
||||||
|
for f in $out/share/applications/*.desktop; do
|
||||||
|
substituteInPlace "$f" \
|
||||||
|
--replace "Exec=libreoffice${major}.${minor}" "Exec=soffice"
|
||||||
|
done
|
||||||
|
|
||||||
for i in sbase scalc sdraw smath swriter simpress soffice unopkg; do
|
for i in sbase scalc sdraw smath swriter simpress soffice unopkg; do
|
||||||
makeWrapper ${unwrapped}/lib/libreoffice/program/$i $out/bin/$i ${makeWrapperArgs}
|
makeWrapper ${unwrapped}/lib/libreoffice/program/$i $out/bin/$i ${makeWrapperArgs}
|
||||||
'' + lib.optionalString dbusVerify ''
|
'' + lib.optionalString dbusVerify ''
|
||||||
|
|
Loading…
Reference in a new issue