diff --git a/web/lukegbcom/default.nix b/web/lukegbcom/default.nix index 72bd42d327..894c89beb6 100644 --- a/web/lukegbcom/default.nix +++ b/web/lukegbcom/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ depot, pkgs, ... }: let nodejs = pkgs.nodejs-16_x; @@ -21,6 +21,15 @@ pkgs.stdenv.mkDerivation { "result*" ] ./.; buildInputs = [ nodejs ]; + postPatch = let + f0Firmware = depot.nix.pkgs.flipperzero-firmware; + in '' + sed -i \ + -e 's/__FLIPPER_FIRMWARE_NAME__/${f0Firmware.name}/g' \ + -e 's/__FLIPPER_FIRMWARE_VERSION__/${f0Firmware.version}/g' \ + -e 's/__FLIPPER_UPSTREAM_VERSION__/${f0Firmware.upstreamVersion}/g' \ + pages/tools.js + ''; buildPhase = '' ln -s ${nodeDependencies}/lib/node_modules ./node_modules export PATH="${nodeDependencies}/bin:$PATH" diff --git a/web/lukegbcom/pages/tools.js b/web/lukegbcom/pages/tools.js index b0f2153331..c71427063a 100644 --- a/web/lukegbcom/pages/tools.js +++ b/web/lukegbcom/pages/tools.js @@ -27,6 +27,9 @@ export default function Toolbox() {
  • EE QRCode Mangler
  • +
  • + Flipper Zero Firmware __FLIPPER_FIRMWARE_VERSION__ (web flasher) +