flexoptix-app: 5.21.2-latest -> 5.48.0-latest (#432791)

0x4A6F b72bf35d 28399951

Changed files
+42 -21
pkgs
+9
pkgs/by-name/fl/flexoptix-app/allow-no-secret-manager.patch
···
+
--- app/node_modules/rme-electron/main/fo-storage/models/fo-storage-file.js
+
+++ app/node_modules/rme-electron/main/fo-storage/models/fo-storage-file.js
+
@@ -25,6 +25,7 @@
+
if (!this.#isPlainObject(initialContent)) {
+
throw new Error("Content must be a plain object");
+
}
+
+ safeStorage.setUsePlainTextEncryption(true);
+
this.#content = initialContent;
+
}
+12 -16
pkgs/by-name/fl/flexoptix-app/disable-autoupdate.patch
···
-
--- app/electron/jsComponents/mainWindowEvents.js 2024-02-18 12:53:41.115773007 -0500
-
+++ app/electron/jsComponents/mainWindowEvents.js2 2024-02-18 23:22:20.003280203 -0500
-
@@ -128,7 +128,12 @@
-
-
if (app.isPackaged) {
-
global.mainWindow.webContents.once("did-finish-load", function () {
-
- autoUpdater.checkForUpdates();
-
+ global.mainWindow.loadURL(
-
+ url.format({
-
+ ...global.APPLICATION_URL_OBJECT,
-
+ slashes: true,
-
+ }),
-
+ );
-
});
-
} else {
-
global.mainWindow.webContents.openDevTools();
+
--- app/node_modules/electron-updater/out/AppUpdater.js
+
+++ app/node_modules/electron-updater/out/AppUpdater.js
+
@@ -211,6 +211,9 @@
+
* Asks the server whether there is an update.
+
*/
+
checkForUpdates() {
+
+ this.emit("update-not-available", null);
+
+ return true;
+
+
+
if (!this.isUpdaterActive()) {
+
return Promise.resolve(null);
+
}
+21 -5
pkgs/by-name/fl/flexoptix-app/package.nix
···
appimageTools,
fetchurl,
asar,
+
python3,
}:
let
pname = "flexoptix-app";
-
version = "5.21.2-latest";
+
version = "5.48.0-latest";
src = fetchurl {
name = "${pname}-${version}.AppImage";
url = "https://flexbox.reconfigure.me/download/electron/linux/x64/FLEXOPTIX%20App.${version}.AppImage";
-
hash = "sha256-BnNRwD09CE1EZDg3Hn3khN4FZ8Hj5LLAunk+NKU5BJo=";
+
hash = "sha256-VSGfExus+4dDef6V1ZEATMBVCIb0JS459+yolx5sg3c=";
};
udevRules = fetchurl {
url = "https://www.flexoptix.net/static/frontend/Flexoptix/default/en_US/files/99-tprogrammer.rules";
-
hash = "sha256-faowRYdrk88WUpOpaEfedzybBgxVRZhvAaYP9HAuzAE=";
+
hash = "sha256-/1ZtJT+1IMyYqw3N0bVJ/T3vbmex169lzx+SlY5WsnA=";
};
appimageContents = (appimageTools.extract { inherit pname version src; }).overrideAttrs (oA: {
buildCommand = ''
${oA.buildCommand}
-
# Get rid of the autoupdater
+
# Remove left-over node-gyp executable symlinks
+
# https://github.com/nodejs/node-gyp/issues/2713
+
find $out/ -type l -name python3 -exec ln -sf ${python3.interpreter} {} \;
+
+
# Extract app to make it patchable
${asar}/bin/asar extract $out/resources/app.asar app
+
+
# Fix app crash when none of these secret managers is available: https://www.electronjs.org/docs/latest/api/safe-storage#safestoragegetselectedstoragebackend-linux
+
patch -p0 < ${./allow-no-secret-manager.patch}
+
# Get rid of the autoupdater
patch -p0 < ${./disable-autoupdate.patch}
+
+
# Makes debugging easier: cp -r app $out/_app
+
+
# Repackage
${asar}/bin/asar pack app $out/resources/app.asar
'';
});
···
install -Dm444 ${appimageContents}/flexoptix-app.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/flexoptix-app.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/flexoptix-app.desktop \
-
--replace 'Exec=AppRun' "Exec=$out/bin/${pname} --"
+
--replace-fail 'Exec=AppRun' "Exec=$out/bin/${pname} --"
+
+
# For debugging
+
[[ -e ${appimageContents}/_app ]] && ln -s ${appimageContents}/_app $out
# Add udev rules
mkdir -p $out/lib/udev/rules.d