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.
This commit is contained in:
parent
f74b8acfac
commit
9aa05d18b7
|
@ -1,12 +1,12 @@
|
||||||
{ lib, appimageTools, fetchurl }: let
|
{ lib, appimageTools, fetchurl, nodePackages }: let
|
||||||
pname = "flexoptix-app";
|
pname = "flexoptix-app";
|
||||||
version = "5.9.0";
|
version = "5.11.0";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
name = "${name}.AppImage";
|
name = "${name}.AppImage";
|
||||||
url = "https://flexbox.reconfigure.me/download/electron/linux/x64/FLEXOPTIX%20App.${version}.AppImage";
|
url = "https://flexbox.reconfigure.me/download/electron/linux/x64/FLEXOPTIX%20App.${version}.AppImage";
|
||||||
sha256 = "0gbqaj9b11mxx0knmmh2d5863kaslbb3r6c4h8rjhg8qy4cws7hj";
|
sha256 = "sha256:1hzdb2fbkwpsf0d3ws4z32blk6549jwhf1lrlqmcxhzqfvkr4gin";
|
||||||
};
|
};
|
||||||
|
|
||||||
udevRules = fetchurl {
|
udevRules = fetchurl {
|
||||||
|
@ -14,12 +14,20 @@
|
||||||
sha256 = "0mr1bhgvavq1ax4206z1vr2y64s3r676w9jjl9ysziklbrsvk5rr";
|
sha256 = "0mr1bhgvavq1ax4206z1vr2y64s3r676w9jjl9ysziklbrsvk5rr";
|
||||||
};
|
};
|
||||||
|
|
||||||
appimageContents = appimageTools.extractType2 {
|
appimageContents = (appimageTools.extract { inherit name src; }).overrideAttrs (oA: {
|
||||||
inherit name src;
|
buildCommand = ''
|
||||||
};
|
${oA.buildCommand}
|
||||||
|
|
||||||
in appimageTools.wrapType2 {
|
# Get rid of the autoupdater
|
||||||
inherit name src;
|
${nodePackages.asar}/bin/asar extract $out/resources/app.asar app
|
||||||
|
sed -i 's/async isUpdateAvailable.*/async isUpdateAvailable(updateInfo) { return false;/g' app/node_modules/electron-updater/out/AppUpdater.js
|
||||||
|
${nodePackages.asar}/bin/asar pack app $out/resources/app.asar
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
in appimageTools.wrapAppImage {
|
||||||
|
inherit name;
|
||||||
|
src = appimageContents;
|
||||||
|
|
||||||
multiPkgs = null; # no 32bit needed
|
multiPkgs = null; # no 32bit needed
|
||||||
extraPkgs = { pkgs, ... }@args: [
|
extraPkgs = { pkgs, ... }@args: [
|
||||||
|
@ -27,11 +35,14 @@ in appimageTools.wrapType2 {
|
||||||
] ++ appimageTools.defaultFhsEnvArgs.multiPkgs args;
|
] ++ appimageTools.defaultFhsEnvArgs.multiPkgs args;
|
||||||
|
|
||||||
extraInstallCommands = ''
|
extraInstallCommands = ''
|
||||||
|
# Add desktop convencience stuff
|
||||||
mv $out/bin/{${name},${pname}}
|
mv $out/bin/{${name},${pname}}
|
||||||
install -Dm444 ${appimageContents}/flexoptix-app.desktop -t $out/share/applications
|
install -Dm444 ${appimageContents}/flexoptix-app.desktop -t $out/share/applications
|
||||||
install -Dm444 ${appimageContents}/flexoptix-app.png -t $out/share/pixmaps
|
install -Dm444 ${appimageContents}/flexoptix-app.png -t $out/share/pixmaps
|
||||||
substituteInPlace $out/share/applications/flexoptix-app.desktop \
|
substituteInPlace $out/share/applications/flexoptix-app.desktop \
|
||||||
--replace 'Exec=AppRun' "Exec=$out/bin/${pname}"
|
--replace 'Exec=AppRun' "Exec=$out/bin/${pname} --"
|
||||||
|
|
||||||
|
# Add udev rules
|
||||||
mkdir -p $out/lib/udev/rules.d
|
mkdir -p $out/lib/udev/rules.d
|
||||||
ln -s ${udevRules} $out/lib/udev/rules.d/99-tprogrammer.rules
|
ln -s ${udevRules} $out/lib/udev/rules.d/99-tprogrammer.rules
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue