nixpkgs/pkgs/applications/graphics/openboard/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

120 lines
3.0 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, copyDesktopItems, makeDesktopItem, qmake
, qtbase, qtxmlpatterns, qttools, qtwebengine, libGL, fontconfig, openssl, poppler, wrapQtAppsHook
, ffmpeg, libva, alsa-lib, SDL, x264, libvpx, libvorbis, libtheora, libogg
2021-04-24 08:53:17 +00:00
, libopus, lame, fdk_aac, libass, quazip, libXext, libXfixes }:
let
importer = stdenv.mkDerivation {
2021-04-24 08:53:17 +00:00
pname = "openboard-importer";
version = "unstable-2016-10-08";
src = fetchFromGitHub {
owner = "OpenBoard-org";
repo = "OpenBoard-Importer";
rev = "47927bda021b4f7f1540b794825fb0d601875e79";
sha256 = "19zhgsimy0f070caikc4vrrqyc8kv2h6rl37sy3iggks8z0g98gf";
};
nativeBuildInputs = [ qmake ];
buildInputs = [ qtbase ];
dontWrapQtApps = true;
2021-04-24 08:53:17 +00:00
installPhase = ''
install -Dm755 OpenBoardImporter $out/bin/OpenBoardImporter
'';
};
in stdenv.mkDerivation (finalAttrs: {
2021-04-24 08:53:17 +00:00
pname = "openboard";
version = "1.7.0";
2021-04-24 08:53:17 +00:00
src = fetchFromGitHub {
owner = "OpenBoard-org";
repo = "OpenBoard";
rev = "v${finalAttrs.version}";
hash = "sha256-OSAogtZoMisyRziv63ag9w8HQaaRdz0J28jQZR7cTMM=";
2021-04-24 08:53:17 +00:00
};
postPatch = ''
substituteInPlace OpenBoard.pro \
2022-12-31 02:17:58 +00:00
--replace '/usr/include/quazip5' '${lib.getDev quazip}/include/QuaZip-Qt5-${quazip.version}/quazip' \
2021-05-02 02:25:15 +00:00
--replace '-lquazip5' '-lquazip1-qt5' \
2022-12-31 02:17:58 +00:00
--replace '/usr/include/poppler' '${lib.getDev poppler}/include/poppler'
2021-04-24 08:53:17 +00:00
'';
nativeBuildInputs = [ qmake copyDesktopItems wrapQtAppsHook ];
2021-04-24 08:53:17 +00:00
buildInputs = [
qtbase
qtxmlpatterns
qttools
qtwebengine
2021-04-24 08:53:17 +00:00
libGL
fontconfig
openssl
poppler
ffmpeg
libva
alsa-lib
2021-04-24 08:53:17 +00:00
SDL
x264
libvpx
libvorbis
libtheora
libogg
libopus
lame
fdk_aac
libass
quazip
libXext
libXfixes
];
propagatedBuildInputs = [ importer ];
makeFlags = [ "release-install" ];
desktopItems = [
(makeDesktopItem {
name = "OpenBoard";
exec = "OpenBoard %f";
icon = "OpenBoard";
comment = "OpenBoard, an interactive white board application";
2021-04-24 08:53:17 +00:00
desktopName = "OpenBoard";
mimeTypes = [ "application/ubz" ];
categories = [ "Education" ];
2021-04-24 08:53:17 +00:00
startupNotify = true;
})
];
installPhase = ''
runHook preInstall
2021-04-24 08:53:17 +00:00
lrelease OpenBoard.pro
# Replicated release_scripts/linux/package.sh
mkdir -p $out/opt/openboard/i18n
cp -R resources/customizations build/linux/release/product/* $out/opt/openboard/
cp resources/i18n/*.qm $out/opt/openboard/i18n/
install -m644 resources/linux/openboard-ubz.xml $out/opt/openboard/etc/
install -Dm644 resources/images/OpenBoard.png $out/share/icons/hicolor/64x64/apps/OpenBoard.png
runHook postInstall
2021-04-24 08:53:17 +00:00
'';
dontWrapQtApps = true;
postFixup = ''
makeWrapper $out/opt/openboard/OpenBoard $out/bin/OpenBoard \
"''${qtWrapperArgs[@]}"
'';
meta = with lib; {
2021-04-26 09:33:53 +00:00
description = "Interactive whiteboard application";
2021-04-24 08:53:17 +00:00
license = licenses.gpl3Plus;
maintainers = with maintainers; [ fufexan ];
platforms = platforms.linux;
2024-02-11 02:19:15 +00:00
mainProgram = "OpenBoard";
2021-04-24 08:53:17 +00:00
};
})