Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions nix/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl
, dpkg, autoPatchelfHook, makeWrapper, wrapGAppsHook3
, gtk3, gdk-pixbuf, cairo, glib, webkitgtk_4_1, libsoup_3, libgcc, gst_all_1
, dpkg, autoPatchelfHook, wrapGAppsHook3
, gtk3, gdk-pixbuf, cairo, glib, webkitgtk_4_1, libsoup_3, libgcc, dbus
}:

let
Expand Down Expand Up @@ -36,33 +36,28 @@ stdenv.mkDerivation {
src = srcMap.${sys};

nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
dpkg autoPatchelfHook makeWrapper wrapGAppsHook3
dpkg autoPatchelfHook wrapGAppsHook3
];

# Match the dynamic libs the shipped Linux binary actually NEEDs
# (gtk/webkit stack). No GStreamer — OpenSlides has no A/V playback.
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
gtk3 gdk-pixbuf cairo glib webkitgtk_4_1 libsoup_3 libgcc
gst_all_1.gstreamer gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad
gtk3
gdk-pixbuf
cairo
glib
webkitgtk_4_1
libsoup_3
libgcc
dbus
];

GST_PLUGIN_SYSTEM_PATH = lib.optionalString stdenv.hostPlatform.isLinux
"${gst_all_1.gst-plugins-base}/lib/gstreamer-1.0:${gst_all_1.gst-plugins-good}/lib/gstreamer-1.0:${gst_all_1.gst-plugins-bad}/lib/gstreamer-1.0";

# wrapGAppsHook3 would auto-wrap the binary in postFixup; we wrap it manually
# to add the GStreamer path, so disable the auto-wrap and splice the hook's
# GApps args into our single wrapper instead of nesting two wrappers.
dontWrapGApps = true;

unpackPhase = if stdenv.hostPlatform.isLinux then "dpkg -x $src ." else "tar xzf $src";

installPhase = if stdenv.hostPlatform.isLinux then ''
mkdir -p $out/bin $out/share
cp -r usr/share/* $out/share/
install -Dm755 usr/bin/openslides $out/bin/openslides

wrapProgram $out/bin/openslides \
"''${gappsWrapperArgs[@]}" \
--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
'' else ''
mkdir -p $out/Applications
cp -r *.app $out/Applications/
Expand Down
12 changes: 8 additions & 4 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"csp": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' ipc: http://ipc.localhost; worker-src 'self' blob:; object-src 'none'; base-uri 'self'; form-action 'self'",
"assetProtocol": {
"enable": true,
"scope": ["**"]
"scope": [
"**"
]
}
},
"macOSPrivateApi": false
Expand All @@ -42,7 +44,7 @@
"publisher": "codewiththiha",
"category": "Education",
"shortDescription": "Offline-first code presentation desktop app",
"longDescription": "OpenSlides a free, open-source, offline desktop app for turning code into polished slides with smooth step-by-step transitions.",
"longDescription": "OpenSlides \u2014 a free, open-source, offline desktop app for turning code into polished slides with smooth step-by-step transitions.",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
Expand All @@ -69,7 +71,7 @@
]
},
"appimage": {
"bundleMediaFramework": true
"bundleMediaFramework": false
}
},
"windows": {
Expand All @@ -78,7 +80,9 @@
},
"nsis": {
"installMode": "currentUser",
"languages": ["English"],
"languages": [
"English"
],
"displayLanguageSelector": false,
"installerIcon": "icons/icon.ico"
}
Expand Down
Loading