git.iko.soy/typeable/nixpkgs
on master help sign in
libreoffice: fix Exec= in .desktop files

Before we do substitutions, the Exec= line is (currently) "Exec=libreofficedev4.3 --some-arg". Our substitution logic doesn't handle that, resulting in broken "Exec=$out/bin/sofficedev4.3 --some-arg" ($out/bin/sofficedev4.3 doesn't exist). Looking at libreoffice source, the .desktop files refer to a UNIXBASISROOTNAME variable which come from instsetoo_native/util/openoffice.lst.in. Currently, it can have one of two values, presumably depending on whether the build is "normal" or "development": libreoffice${major}.${minor} libreofficedev${major}.${minor} Handle both these cases, and also leave the old non-versioned substitution around, just in case. Fixes issue #3463.

commit64661f0597a49e9836d3b9cb5c1bdea5e7624922 authorBjørn Forsman <bjorn.forsman@gmail.com> dateSun 14 Dec 2014, 18:05 (12 years ago) parent6221af5
1 file changed+2−1
pkgs/applications/office/libreoffice/default.nix+2−1
pkgs/applications/office/libreoffice/default.nix+2−1
@@ -176,7 +176,8 @@ stdenv.mkDerivation rec {
176176
177177 ln -s $out/lib/libreoffice/share/xdg $out/share/applications
178178 for f in $out/share/applications/*.desktop; do
179− substituteInPlace "$f" --replace "Exec=libreoffice4.0" "Exec=$out/bin/soffice"
179+ substituteInPlace "$f" --replace "Exec=libreofficedev${major}.${minor}" "Exec=$out/bin/soffice"
180+ substituteInPlace "$f" --replace "Exec=libreoffice${major}.${minor}" "Exec=$out/bin/soffice"
180181 substituteInPlace "$f" --replace "Exec=libreoffice" "Exec=$out/bin/soffice"
181182 done
182183 '';