From 8f592e9aa1bb02070c86fb606aa18f82df8829c4 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Fri, 10 Feb 2023 21:02:05 +0000 Subject: [PATCH] lukegbcom: add link to flipperzero firmware --- web/lukegbcom/default.nix | 11 ++++++++++- web/lukegbcom/pages/tools.js | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) 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) +