openlp: init at 2.4.6

free church presentation software

+197
+86
pkgs/applications/misc/openlp/default.nix
··· 1 + # This file contains all runtime glue: Bindings to optional runtime dependencies 2 + # for pdfSupport, presentationSupport, and media playback. 3 + { lib, mkDerivation, wrapGAppsHook, python3Packages 4 + 5 + # qt deps 6 + , qtbase, qtmultimedia 7 + 8 + # optional deps 9 + , pdfSupport ? false, mupdf # alternatively could use ghostscript 10 + , presentationSupport ? false, libreoffice-unwrapped 11 + , vlcSupport ? false 12 + , gstreamerSupport ? false, gst_all_1, gstPlugins ? (gst: [ 13 + gst.gst-plugins-base 14 + gst.gst-plugins-good 15 + gst.gst-plugins-bad 16 + gst.gst-plugins-ugly 17 + ]) 18 + 19 + #, enableMySql ? false # Untested. If interested, contact maintainer. 20 + #, enablePostgreSql ? false # Untested. If interested, contact maintainer. 21 + #, enableJenkinsApi ? false # Untested. If interested, contact maintainer. 22 + }: 23 + 24 + let p = gstPlugins gst_all_1; 25 + # If gstreamer is activated but no plugins are given, it will at runtime 26 + # create the false illusion of being usable. 27 + in assert gstreamerSupport -> (builtins.isList p && builtins.length p > 0); 28 + 29 + let 30 + # optional packages 31 + libreofficePath = "${libreoffice-unwrapped}/lib/libreoffice/program"; 32 + 33 + # lib functions 34 + inherit (lib.lists) optional optionals; 35 + wrapSetVar = var: ''--set ${var} "''$${var}"''; 36 + 37 + # base pkg/lib 38 + baseLib = python3Packages.callPackage ./lib.nix { }; 39 + in mkDerivation { 40 + inherit (baseLib) pname version src; 41 + 42 + nativeBuildInputs = [ python3Packages.wrapPython wrapGAppsHook ]; 43 + buildInputs = [ qtbase ] ++ optionals gstreamerSupport 44 + ([ qtmultimedia.bin gst_all_1.gstreamer ] ++ gstPlugins gst_all_1); 45 + propagatedBuildInputs = optional pdfSupport mupdf 46 + ++ optional presentationSupport libreoffice-unwrapped; 47 + pythonPath = [ baseLib ] ++ optional vlcSupport python3Packages.python-vlc; 48 + # ++ optional enableMySql mysql-connector # Untested. If interested, contact maintainer. 49 + # ++ optional enablePostgreSql psycopg2 # Untested. If interested, contact maintainer. 50 + # ++ optional enableJenkinsApi jenkinsapi # Untested. If interested, contact maintainer. 51 + 52 + PYTHONPATH = libreofficePath; 53 + URE_BOOTSTRAP = "vnd.sun.star.pathname:${libreofficePath}/fundamentalrc"; 54 + UNO_PATH = libreofficePath; 55 + LD_LIBRARY_PATH = libreofficePath; 56 + JAVA_HOME = "${libreoffice-unwrapped.jdk.home}"; 57 + 58 + dontWrapQtApps = true; 59 + dontWrapGApps = true; 60 + 61 + # defined in gappsWrapperHook 62 + wrapPrefixVariables = optionals presentationSupport 63 + [ "PYTHONPATH" "LD_LIBRARY_PATH" "JAVA_HOME" ]; 64 + makeWrapperArgs = [ 65 + "\${gappsWrapperArgs[@]}" 66 + "\${qtWrapperArgs[@]}" 67 + ] ++ optionals presentationSupport 68 + ([ "--prefix PATH : ${libreoffice-unwrapped}/bin" ] 69 + ++ map wrapSetVar [ "URE_BOOTSTRAP" "UNO_PATH" ]); 70 + 71 + installPhase = '' 72 + install -D openlp.py $out/bin/openlp 73 + ''; 74 + 75 + preFixup = '' 76 + wrapPythonPrograms 77 + ''; 78 + 79 + meta = baseLib.meta // { 80 + hydraPlatforms = [ ]; # this is only the wrapper; baseLib gets built 81 + }; 82 + 83 + passthru = { 84 + inherit baseLib; 85 + }; 86 + }
+103
pkgs/applications/misc/openlp/lib.nix
··· 1 + # This file contains the base package, some of which is compiled. 2 + # Runtime glue to optinal runtime dependencies is in 'default.nix'. 3 + { fetchurl, lib, qt5 4 + 5 + # python deps 6 + , python, buildPythonPackage 7 + , alembic, beautifulsoup4, chardet, lxml, Mako, pyenchant 8 + , pyqt5_with_qtwebkit, pyxdg, sip, sqlalchemy, sqlalchemy_migrate 9 + }: 10 + 11 + buildPythonPackage rec { 12 + pname = "openlp"; 13 + version = "2.4.6"; 14 + 15 + src = fetchurl { 16 + url = "https://get.openlp.org/${version}/OpenLP-${version}.tar.gz"; 17 + sha256 = "f63dcf5f1f8a8199bf55e806b44066ad920d26c9cf67ae432eb8cdd1e761fc30"; 18 + }; 19 + 20 + doCheck = false; 21 + # FIXME: checks must be disabled because they are lacking the qt env. 22 + # They fail like this, even if built and wrapped with all Qt and 23 + # runtime dependencies: 24 + # 25 + # running install tests 26 + # qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" 27 + # This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. 28 + # 29 + # Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx. 30 + # 31 + # See also https://discourse.nixos.org/t/qt-plugin-path-unset-in-test-phase/ 32 + 33 + #checkInputs = [ mock nose ]; 34 + nativeBuildInputs = [ qt5.qttools ]; 35 + propagatedBuildInputs = [ 36 + alembic 37 + beautifulsoup4 38 + chardet 39 + lxml 40 + Mako 41 + pyenchant 42 + pyqt5_with_qtwebkit 43 + pyxdg 44 + sip 45 + sqlalchemy 46 + sqlalchemy_migrate 47 + ]; 48 + 49 + prePatch = '' 50 + echo 'from vlc import *' > openlp/core/ui/media/vendor/vlc.py 51 + ''; 52 + 53 + dontWrapQtApps = true; 54 + dontWrapGApps = true; 55 + postInstall = '' 56 + ( # use subshell because of cd 57 + tdestdir="$out/i18n" 58 + mkdir -p "$tdestdir" 59 + cd ./resources/i18n 60 + for file in *.ts; do 61 + lconvert -i "$file" -o "$tdestdir/''${file%%ts}qm" 62 + done 63 + ) 64 + ''; 65 + 66 + preFixup = '' 67 + rm -r $out/${python.sitePackages}/tests 68 + rm -r $out/bin 69 + ''; 70 + 71 + meta = with lib; { 72 + description = "Free church presentation software"; 73 + homepage = "https://openlp.org/"; 74 + downloadPage = "https://openlp.org/#downloads"; 75 + platforms = platforms.unix; 76 + license = licenses.gpl2Only; 77 + maintainers = [ maintainers.jorsn ]; 78 + 79 + longDescription = '' 80 + OpenLP is a free church presentation software. 81 + 82 + Features: 83 + 84 + * Cross platform between Linux, Windows, OS X and FreeBSD 85 + * Display songs, Bible verses, presentations, images, audio and video 86 + * Control OpenLP remotely via the Android remote, iOS remote or mobile web browser 87 + * Quickly and easily import songs from other popular presentation packages 88 + * Easy enough to use to get up and running in less than 10 minutes 89 + 90 + Remark: This pkg only supports sqlite dbs. If you wish to have support for 91 + mysql or postgresql dbs, or Jenkins, please contact the maintainer. 92 + 93 + Bugs which affect this software packaged in Nixpkgs: 94 + 95 + 1. The package must disable checks, because they are lacking the qt env. 96 + (see pkg source and https://discourse.nixos.org/t/qt-plugin-path-unset-in-test-phase/) 97 + 2. There is a segfault on exit. Not a real problem, according to debug log, everything 98 + shuts down correctly. Maybe related to https://forums.openlp.org/discussion/3620/crash-on-exit. 99 + Plan: Wait for OpenLP-3, since it is already in beta 1 100 + (2021-02-09; news: https://openlp.org/blog/). 101 + ''; 102 + }; 103 + }
+8
pkgs/top-level/all-packages.nix
··· 27737 27737 27738 27738 octopus = callPackage ../applications/science/chemistry/octopus { }; 27739 27739 27740 + openlp = libsForQt5.callPackage ../applications/misc/openlp { }; 27741 + openlpFull = appendToName "full" (openlp.override { 27742 + pdfSupport = true; 27743 + presentationSupport = true; 27744 + vlcSupport = true; 27745 + gstreamerSupport = true; 27746 + }); 27747 + 27740 27748 openmolcas = callPackage ../applications/science/chemistry/openmolcas { }; 27741 27749 27742 27750 pymol = callPackage ../applications/science/chemistry/pymol { };