1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-13 08:05:40 +00:00
nixpkgs/pkgs/applications/office/libreoffice/wrapper.nix
2019-09-08 23:38:31 +00:00

20 lines
484 B
Nix

{ libreoffice, runCommand, dbus, bash }:
let
jdk = libreoffice.jdk;
in
(runCommand libreoffice.name {
inherit dbus libreoffice jdk bash;
} ''
mkdir -p "$out/bin"
ln -s "${libreoffice}/share" "$out/share"
substituteAll "${./wrapper.sh}" "$out/bin/soffice"
chmod a+x "$out/bin/soffice"
for i in $(ls "${libreoffice}/bin/"); do
test "$i" = "soffice" || ln -s soffice "$out/bin/$(basename "$i")"
done
'') // {
inherit libreoffice dbus;
meta = libreoffice.meta;
}