Skip to content

Commit

Permalink
bazecor: workaround to remove annoying udev rules check
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Oct 15, 2023
1 parent 82561c5 commit 78c321f
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions home/overlays/bazecor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,34 @@ let
{ lib
, appimageTools
, fetchurl
, runCommand
}:

appimageTools.wrapAppImage rec {
let
pname = "bazecor";
version = "1.3.4-hot-fix";

src = appimageTools.extract {
inherit pname version;
src = fetchurl {
url = "https://github.com/gvolpe/bazecor-1.3.4-bug-fix/releases/download/v${version}/Bazecor-${version}-x64.AppImage";
hash = "sha256-mi9/RiVEPEtrqEimw1Bg1QSRBM/JeqUkcB/8OkaURZk=";
#url = "https://github.com/Dygmalab/Bazecor/releases/download/v${version}/Bazecor-${version}-x64.AppImage";
};
appimageSrc = fetchurl {
url = "https://github.com/gvolpe/bazecor-1.3.4-bug-fix/releases/download/v${version}/Bazecor-${version}-x64.AppImage";
hash = "sha256-mi9/RiVEPEtrqEimw1Bg1QSRBM/JeqUkcB/8OkaURZk=";
#url = "https://github.com/Dygmalab/Bazecor/releases/download/v${version}/Bazecor-${version}-x64.AppImage";
};

src = runCommand "${pname}-extracted"
{
buildInputs = [ appimageTools.appimage-exec ];
} ''
appimage-exec.sh -x $out ${appimageSrc}
# Disable udev rules check to fix this annoying issue: https://github.com/Dygmalab/Bazecor/issues/370
substituteInPlace $out/usr/lib/bazecor/resources/app/.webpack/main/index.js \
--replace "checkUdev=()=>{try{if(c.default.existsSync(f))return c.default.readFileSync(f,\"utf-8\").trim()===l.trim()}catch(e){console.error(e)}return!1}" "checkUdev=()=>{return 1}"
'';
in

appimageTools.wrapAppImage rec {
inherit pname src version;

extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
p.glib
];
Expand Down

0 comments on commit 78c321f

Please sign in to comment.