summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorMihai Fufezan <fufexan@pm.me>2021-04-24 11:53:17 +0300
committerMihai Fufezan <fufexan@pm.me>2021-04-26 11:21:17 +0300
commitcde5ca089a76b52cf724f6781c06d7f0ea26b377 (patch)
tree3811fe410b56e8cee8345b04e361d69334158d98 /pkgs/applications/graphics
parent93184413f2180ce79d53df91df4d43c2e8f931aa (diff)
downloadnixpkgs-cde5ca089a76b52cf724f6781c06d7f0ea26b377.tar
nixpkgs-cde5ca089a76b52cf724f6781c06d7f0ea26b377.tar.gz
nixpkgs-cde5ca089a76b52cf724f6781c06d7f0ea26b377.tar.bz2
nixpkgs-cde5ca089a76b52cf724f6781c06d7f0ea26b377.tar.lz
nixpkgs-cde5ca089a76b52cf724f6781c06d7f0ea26b377.tar.xz
nixpkgs-cde5ca089a76b52cf724f6781c06d7f0ea26b377.tar.zst
nixpkgs-cde5ca089a76b52cf724f6781c06d7f0ea26b377.zip
openboard: init at 1.6.1
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/openboard/default.nix116
1 files changed, 116 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/openboard/default.nix b/pkgs/applications/graphics/openboard/default.nix
new file mode 100644
index 00000000000..0aff3c997ff
--- /dev/null
+++ b/pkgs/applications/graphics/openboard/default.nix
@@ -0,0 +1,116 @@
+{ mkDerivation, lib, fetchFromGitHub, copyDesktopItems, makeDesktopItem, qmake
+, qtbase, qtxmlpatterns, qttools, qtwebkit, libGL, fontconfig, openssl, poppler
+, ffmpeg, libva, alsaLib, SDL, x264, libvpx, libvorbis, libtheora, libogg
+, libopus, lame, fdk_aac, libass, quazip, libXext, libXfixes }:
+
+let
+  importer = mkDerivation rec {
+    pname = "openboard-importer";
+    version = "unstable-2016-10-08";
+
+    src = fetchFromGitHub {
+      owner = "OpenBoard-org";
+      repo = "OpenBoard-Importer";
+      rev = "47927bda021b4f7f1540b794825fb0d601875e79";
+      sha256 = "19zhgsimy0f070caikc4vrrqyc8kv2h6rl37sy3iggks8z0g98gf";
+    };
+
+    nativeBuildInputs = [ qmake ];
+
+    installPhase = ''
+      install -Dm755 OpenBoardImporter $out/bin/OpenBoardImporter
+    '';
+  };
+in mkDerivation rec {
+  pname = "openboard";
+  version = "1.6.1";
+
+  src = fetchFromGitHub {
+    owner = "OpenBoard-org";
+    repo = "OpenBoard";
+    rev = "v${version}";
+    sha256 = "sha256-OlGXGIMghil/GG6eso20+CWo/hCjarXGs6edXX9pc/M=";
+  };
+
+  postPatch = ''
+    substituteInPlace OpenBoard.pro \
+      --replace '/usr/include/quazip' '${quazip}/include/quazip5' \
+      --replace '/usr/include/poppler' '${poppler.dev}/include/poppler'
+  '';
+
+  nativeBuildInputs = [ qmake copyDesktopItems ];
+
+  buildInputs = [
+    qtbase
+    qtxmlpatterns
+    qttools
+    qtwebkit
+    libGL
+    fontconfig
+    openssl
+    poppler
+    ffmpeg
+    libva
+    alsaLib
+    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 = "";
+      desktopName = "OpenBoard";
+      mimeType = "application/ubz";
+      categories = "Education;";
+      startupNotify = true;
+    })
+  ];
+
+  installPhase = ''
+    runHook preBuild
+
+    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 postBuild
+  '';
+
+  dontWrapQtApps = true;
+
+  postFixup = ''
+    makeWrapper $out/opt/openboard/OpenBoard $out/bin/OpenBoard \
+      "''${qtWrapperArgs[@]}"
+  '';
+
+  meta = with lib; {
+    description =
+      "Cross-platform interactive whiteboard application intended for use in a classroom setting";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ fufexan ];
+    platforms = platforms.linux;
+  };
+}