diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-12-14 18:05:08 +0100 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-12-14 18:05:24 +0100 |
commit | 64661f0597a49e9836d3b9cb5c1bdea5e7624922 (patch) | |
tree | fbcf532d0e5815b2852dc471875ab7249b758985 | |
parent | 6221af50c48664693b7249b253b68083dbca2706 (diff) | |
download | nixlib-64661f0597a49e9836d3b9cb5c1bdea5e7624922.tar nixlib-64661f0597a49e9836d3b9cb5c1bdea5e7624922.tar.gz nixlib-64661f0597a49e9836d3b9cb5c1bdea5e7624922.tar.bz2 nixlib-64661f0597a49e9836d3b9cb5c1bdea5e7624922.tar.lz nixlib-64661f0597a49e9836d3b9cb5c1bdea5e7624922.tar.xz nixlib-64661f0597a49e9836d3b9cb5c1bdea5e7624922.tar.zst nixlib-64661f0597a49e9836d3b9cb5c1bdea5e7624922.zip |
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.
-rw-r--r-- | pkgs/applications/office/libreoffice/default.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix index ceb1a9eab865..78eaa78ee10a 100644 --- a/pkgs/applications/office/libreoffice/default.nix +++ b/pkgs/applications/office/libreoffice/default.nix @@ -176,7 +176,8 @@ stdenv.mkDerivation rec { ln -s $out/lib/libreoffice/share/xdg $out/share/applications for f in $out/share/applications/*.desktop; do - substituteInPlace "$f" --replace "Exec=libreoffice4.0" "Exec=$out/bin/soffice" + substituteInPlace "$f" --replace "Exec=libreofficedev${major}.${minor}" "Exec=$out/bin/soffice" + substituteInPlace "$f" --replace "Exec=libreoffice${major}.${minor}" "Exec=$out/bin/soffice" substituteInPlace "$f" --replace "Exec=libreoffice" "Exec=$out/bin/soffice" done ''; |