From 7f51bc2cfc21052ad9fa45c5eb27e4a15a6e6c86 Mon Sep 17 00:00:00 2001 From: Gabriel Volpe Date: Sat, 21 Oct 2023 10:54:34 +0200 Subject: [PATCH] flakes: update all inputs on October 21, 2023 (#243) * flakes: update all inputs on October 21, 2023 * bazecor: use new postExtract option from appimageTools --- flake.lock | 30 +++++++++++++------------- flake.nix | 2 +- home/overlays/bazecor/default.nix | 36 ++++++++++++------------------- 3 files changed, 30 insertions(+), 38 deletions(-) diff --git a/flake.lock b/flake.lock index 45aa2717..70f59f1e 100644 --- a/flake.lock +++ b/flake.lock @@ -503,11 +503,11 @@ "gh-md-toc": { "flake": false, "locked": { - "lastModified": 1696154235, - "narHash": "sha256-OFcMZdVL9qz+OB3hOYfjElwHXowcBLiUPQvPnK4seOc=", + "lastModified": 1696949035, + "narHash": "sha256-hq0sMJnI2kN1QE/Gez1wKlmXm6fxR8Z5QgpF3ydcyhA=", "owner": "ekalinin", "repo": "github-markdown-toc", - "rev": "656b34011a482544a9ebb4116332c044834bdbbf", + "rev": "b9e7e61c2d87ed7bcab389a3cce43c36f95010cd", "type": "github" }, "original": { @@ -614,11 +614,11 @@ ] }, "locked": { - "lastModified": 1696145345, - "narHash": "sha256-3dM7I/d4751SLPJah0to1WBlWiyzIiuCEUwJqwBdmr4=", + "lastModified": 1697838989, + "narHash": "sha256-hwVlO+st8vWJO6iy3/JbMHrUyY4Ak7xUSmffoWqBPUg=", "owner": "nix-community", "repo": "home-manager", - "rev": "6f9b5b83ad1f470b3d11b8a9fe1d5ef68c7d0e30", + "rev": "ae631b0b20f06f7d239d160723d228891ddb2fe0", "type": "github" }, "original": { @@ -1008,11 +1008,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1696019113, - "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", + "lastModified": 1697723726, + "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", + "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", "type": "github" }, "original": { @@ -1054,11 +1054,11 @@ }, "nurpkgs": { "locked": { - "lastModified": 1696149874, - "narHash": "sha256-WpSGs6gfSwm6G7kcVrYOCaCpZw3zffCCOg2RPemvKgk=", + "lastModified": 1697872834, + "narHash": "sha256-MfN3B+Yt51n91qI5gHYwGOTTFuwMtPZ8sif2EUWMZHI=", "owner": "nix-community", "repo": "NUR", - "rev": "af4ee19b5a673024d7fda158cae22402c9ab33c4", + "rev": "84afbd777f428b592833cab61928d75d19b35d62", "type": "github" }, "original": { @@ -1524,11 +1524,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1696145342, - "narHash": "sha256-zvdgxi8tqDPsX7HYtFoKzf+UsKVRVxtBQh5ELW9Kb+U=", + "lastModified": 1697840369, + "narHash": "sha256-BOXjb3oVicNaH+NyoyjyZFuQUnqVTyGQvEo5aaVzq5E=", "owner": "rycee", "repo": "nur-expressions", - "rev": "e8b354ac0a3f5c107deae6dd14f819ba2f85eb28", + "rev": "82e0e3c56e0469b9bc71e12120ee71e4366e2974", "type": "gitlab" }, "original": { diff --git a/flake.nix b/flake.nix index c2e4a396..c5d9a924 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; }; } diff --git a/home/overlays/bazecor/default.nix b/home/overlays/bazecor/default.nix index d4e2d583..363d1480 100644 --- a/home/overlays/bazecor/default.nix +++ b/home/overlays/bazecor/default.nix @@ -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 @@ -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