sqlite_orm: 1.9 -> 1.9.1 (#379250)
[NixPkgs.git] / pkgs / by-name / un / unoconv / package.nix
blob0291fc19c1dd7a7dc1ac26dba4c38588b9a0ea43
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   libreoffice-unwrapped,
6   asciidoc,
7   makeWrapper,
8   # whether to install odt2pdf/odt2doc/... symlinks to unoconv
9   installSymlinks ? true,
12 stdenv.mkDerivation rec {
13   pname = "unoconv";
14   version = "0.9.0";
16   src = fetchFromGitHub {
17     owner = "unoconv";
18     repo = "unoconv";
19     rev = version;
20     sha256 = "1akx64686in8j8arl6vsgp2n3bv770q48pfv283c6fz6wf9p8fvr";
21   };
23   nativeBuildInputs = [
24     asciidoc
25     makeWrapper
26   ];
28   preBuild = ''
29     makeFlags=prefix="$out"
30   '';
32   postInstall =
33     ''
34       sed -i "s|/usr/bin/env python.*|${libreoffice-unwrapped.python.interpreter}|" "$out/bin/unoconv"
35       wrapProgram "$out/bin/unoconv" \
36           --set-default UNO_PATH "${libreoffice-unwrapped}/lib/libreoffice/program/"
37     ''
38     + lib.optionalString installSymlinks ''
39       make install-links prefix="$out"
40     '';
42   meta = with lib; {
43     description = "Convert between any document format supported by LibreOffice/OpenOffice";
44     homepage = "http://dag.wieers.com/home-made/unoconv/";
45     license = licenses.gpl2Only;
46     platforms = platforms.linux;
47     maintainers = [ maintainers.bjornfor ];
48     mainProgram = "unoconv";
49   };