tools: add RF explorer

This commit is contained in:
Kate 2025-06-29 19:41:44 +02:00
parent c463a78d3b
commit 2741d485c4
6 changed files with 118 additions and 8 deletions

View file

@ -145,6 +145,11 @@ with pkgs;
# Office.
sc-im
# Lab tools.
deprekages.rfe-fwupdate
deprekages.rfe-touch
deprekages.rfe-signal
# For editors.
fish
lazygit

View file

@ -33,6 +33,7 @@ with pkgs;
python3
cfr
procyon
mono
# Build systems.
cmake
@ -85,7 +86,6 @@ with pkgs;
if pkgs.stdenv.isDarwin then
[
]
else
[ ]

View file

@ -5,7 +5,7 @@
flake-utils,
deprekages,
nixpkgs,
esp-dev
esp-dev,
}:
flake-utils.lib.eachDefaultSystem (
@ -72,6 +72,11 @@ flake-utils.lib.eachDefaultSystem (
vja = callPackage ./vja.nix { };
gimgtools = callPackage ./gimgtools.nix { };
# rf explorer
rfe-fwupdate = callPackage ./rfe-fwupdate.nix { };
rfe-touch = callPackage ./rfe-touch.nix { };
rfe-signal = callPackage ./rfe-signal.nix { };
# libraries
libnfc-nci = callPackage ./libnfc-nci { };
ws-server = callPackage ./ws-server { };
@ -120,12 +125,12 @@ flake-utils.lib.eachDefaultSystem (
esp-env = esp-dev.${system}.esp-idf-full;
# xonsh and xontribs
xontrib-whole-word-jumping = callPackage ./xontrib-whole-word-jumping.nix {};
xontrib-term-integrations = callPackage ./xontrib-term-integrations.nix {};
xontrib-prompt-starship = callPackage ./xontrib-prompt-starship.nix {};
xontrib-prompt-bar = callPackage ./xontrib-prompt-bar.nix {};
xontrib-termcolors = callPackage ./xontrib-termcolors.nix {};
xontrib-sh = callPackage ./xontrib-sh.nix {};
xontrib-whole-word-jumping = callPackage ./xontrib-whole-word-jumping.nix { };
xontrib-term-integrations = callPackage ./xontrib-term-integrations.nix { };
xontrib-prompt-starship = callPackage ./xontrib-prompt-starship.nix { };
xontrib-prompt-bar = callPackage ./xontrib-prompt-bar.nix { };
xontrib-termcolors = callPackage ./xontrib-termcolors.nix { };
xontrib-sh = callPackage ./xontrib-sh.nix { };
xonsh-with-xontribs = pkgs.xonsh.override {
extraPackages = pythonPackages: [

28
packages/rfe-fwupdate.nix Normal file
View file

@ -0,0 +1,28 @@
{
stdenv,
fetchzip,
mono,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rfe-fwuploader";
version = "latest";
src = fetchzip {
url = "https://j3.rf-explorer.com/download/sw/fw/RFExplorer_UploaderLinux.zip";
hash = "sha256-eHDMQvL0L4JmEc+q4qeKV2i1EMXdE3G1JX2Jhuctg6o=";
stripRoot = false;
};
buildInputs = [ mono ];
installPhase = ''
mkdir -p "$out/bin"
cp $src/RFEUploaderLinux.exe $out/bin/.rfe-fwupdate-mono
echo "#/usr/bin/env sh"
echo "${mono}/bin/mono $out/bin/.rfe-fwupdate-mono" >> $out/bin/rfe-fwupdate
chmod +x $out/bin/rfe-fwupdate
'';
})

36
packages/rfe-signal.nix Normal file
View file

@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchzip,
mono,
gtk2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rfe-signal";
version = "2_5_2105_2";
src = fetchzip {
url = "https://j3.rf-explorer.com/download/sw/linux/RFExplorerGeneratorLinux_v${finalAttrs.version}.zip";
hash = "sha256-bvTH3EzFvizPrb5fv8LzIin45KkmASMRh/rk0BP+yIg=";
stripRoot = false;
};
buildInputs = [
mono
gtk2
];
installPhase = ''
mkdir -p "$out/bin"
cp $src/RFExplorerGeneratorLinux_v${finalAttrs.version}.exe $out/bin/.rfe-touch-mono
OUTFILE="$out/bin/${finalAttrs.pname}"
echo "#/usr/bin/env sh" > $OUTFILE
echo "env LD_LIBRARY_PATH=\"${lib.makeLibraryPath finalAttrs.buildInputs}\" ${mono}/bin/mono $out/bin/.rfe-touch-mono" >> $OUTFILE
chmod +x $OUTFILE
'';
})

36
packages/rfe-touch.nix Normal file
View file

@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchzip,
mono,
gtk2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rfe-touch";
version = "2.7.2206.7";
src = fetchzip {
url = "https://j3.rf-explorer.com/download/sw/linux/RFETouchLinux_${finalAttrs.version}.zip";
hash = "sha256-0/O12nlmAsN4tly574ZNtFSMvhghR/VMU2h6SwzXS/k=";
stripRoot = false;
};
buildInputs = [
mono
gtk2
];
installPhase = ''
mkdir -p "$out/bin"
cp $src/RFETouchLinux_${finalAttrs.version}.exe $out/bin/.rfe-touch-mono
OUTFILE="$out/bin/${finalAttrs.pname}"
echo "#/usr/bin/env sh" > $OUTFILE
echo "env LD_LIBRARY_PATH=\"${lib.makeLibraryPath finalAttrs.buildInputs}\" ${mono}/bin/mono $out/bin/.rfe-touch-mono" >> $OUTFILE
chmod +x $OUTFILE
'';
})