lukegbcom: add link to flipperzero firmware

This commit is contained in:
Luke Granger-Brown 2023-02-10 21:02:05 +00:00
parent edd1e5f944
commit 8f592e9aa1
2 changed files with 13 additions and 1 deletions

View file

@ -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"

View file

@ -27,6 +27,9 @@ export default function Toolbox() {
<li>
<Link href="/tools/ee-qrcode"><a>EE QRCode Mangler</a></Link>
</li>
<li>
<Link href="https://storage.googleapis.com/lukegb-flipperzero/__FLIPPER_FIRMWARE_NAME__.tgz">Flipper Zero Firmware __FLIPPER_FIRMWARE_VERSION__</Link> (<Link href="https://lab.flipper.net/?url=https://storage.googleapis.com/lukegb-flipperzero/__FLIPPER_FIRMWARE_NAME__.tgz&channel=__FLIPPER_FIRMWARE_VERSION__&version=__FLIPPER_UPSTREAM_VERSION__">web flasher</Link>)
</li>
</ul>
</div>
</main>