Skip to content

Commit

Permalink
flakes: update all inputs on October 21, 2023 (#243)
Browse files Browse the repository at this point in the history
* flakes: update all inputs on October 21, 2023

* bazecor: use new postExtract option from appimageTools
  • Loading branch information
gvolpe authored Oct 21, 2023
1 parent bf137a1 commit 7f51bc2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 38 deletions.
30 changes: 15 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
import ./outputs/nixos-conf.nix { inherit inputs system pkgs extraArgs; };

packages.${system} = {
inherit (pkgs) metals metals-updater;
inherit (pkgs) bazecor metals metals-updater;
};
};
}
36 changes: 14 additions & 22 deletions home/overlays/bazecor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,26 @@ let
{ lib
, appimageTools
, fetchurl
, runCommand
}:

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

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}
src = appimageTools.extract {
inherit pname version;

# 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
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";
};

appimageTools.wrapAppImage {
inherit pname src version;
postExtract = ''
# 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}"
'';
};

extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
p.glib
Expand All @@ -41,7 +34,6 @@ let
# Also expose the udev rules here, so it can be used as:
# services.udev.packages = [ pkgs.bazecor ];
# to allow non-root modifications to the keyboards.

extraInstallCommands = ''
mv $out/bin/bazecor-* $out/bin/bazecor
Expand Down

0 comments on commit 7f51bc2

Please sign in to comment.