lol

flexoptix-app: 5.9.0 -> 5.11.0 and fixes

This update is required because the autoupdater prevents the app from
running without being updated (which is not possible because it is a
store path).
So this updates the app and patches out the updater (essentially it
never thinks it needs to update, even though it prints on the command
line that it should).

Also fix the desktop item.

+20 -9
+20 -9
pkgs/tools/misc/flexoptix-app/default.nix
··· 1 - { lib, appimageTools, fetchurl }: let 1 + { lib, appimageTools, fetchurl, nodePackages }: let 2 2 pname = "flexoptix-app"; 3 - version = "5.9.0"; 3 + version = "5.11.0"; 4 4 name = "${pname}-${version}"; 5 5 6 6 src = fetchurl { 7 7 name = "${name}.AppImage"; 8 8 url = "https://flexbox.reconfigure.me/download/electron/linux/x64/FLEXOPTIX%20App.${version}.AppImage"; 9 - sha256 = "0gbqaj9b11mxx0knmmh2d5863kaslbb3r6c4h8rjhg8qy4cws7hj"; 9 + sha256 = "sha256:1hzdb2fbkwpsf0d3ws4z32blk6549jwhf1lrlqmcxhzqfvkr4gin"; 10 10 }; 11 11 12 12 udevRules = fetchurl { ··· 14 14 sha256 = "0mr1bhgvavq1ax4206z1vr2y64s3r676w9jjl9ysziklbrsvk5rr"; 15 15 }; 16 16 17 - appimageContents = appimageTools.extractType2 { 18 - inherit name src; 19 - }; 17 + appimageContents = (appimageTools.extract { inherit name src; }).overrideAttrs (oA: { 18 + buildCommand = '' 19 + ${oA.buildCommand} 20 + 21 + # Get rid of the autoupdater 22 + ${nodePackages.asar}/bin/asar extract $out/resources/app.asar app 23 + sed -i 's/async isUpdateAvailable.*/async isUpdateAvailable(updateInfo) { return false;/g' app/node_modules/electron-updater/out/AppUpdater.js 24 + ${nodePackages.asar}/bin/asar pack app $out/resources/app.asar 25 + ''; 26 + }); 20 27 21 - in appimageTools.wrapType2 { 22 - inherit name src; 28 + in appimageTools.wrapAppImage { 29 + inherit name; 30 + src = appimageContents; 23 31 24 32 multiPkgs = null; # no 32bit needed 25 33 extraPkgs = { pkgs, ... }@args: [ ··· 27 35 ] ++ appimageTools.defaultFhsEnvArgs.multiPkgs args; 28 36 29 37 extraInstallCommands = '' 38 + # Add desktop convencience stuff 30 39 mv $out/bin/{${name},${pname}} 31 40 install -Dm444 ${appimageContents}/flexoptix-app.desktop -t $out/share/applications 32 41 install -Dm444 ${appimageContents}/flexoptix-app.png -t $out/share/pixmaps 33 42 substituteInPlace $out/share/applications/flexoptix-app.desktop \ 34 - --replace 'Exec=AppRun' "Exec=$out/bin/${pname}" 43 + --replace 'Exec=AppRun' "Exec=$out/bin/${pname} --" 44 + 45 + # Add udev rules 35 46 mkdir -p $out/lib/udev/rules.d 36 47 ln -s ${udevRules} $out/lib/udev/rules.d/99-tprogrammer.rules 37 48 '';