xin/pkgs/rtlamr2mqtt.nix

43 lines
776 B
Nix
Raw Permalink Normal View History

2023-09-12 08:44:05 -06:00
{ buildPythonPackage
, callPackage
, fetchFromGitHub
, paho-mqtt
, pyusb
, pyyaml
, requests
, rtl-sdr
, ...
}:
let
rtlamr = callPackage ./rtlamr.nix { };
in
2023-09-12 08:44:05 -06:00
buildPythonPackage {
pname = "rtlamr2mqtt";
version = "unstable-2023-08-17";
2023-09-12 08:44:05 -06:00
format = "none";
2023-09-12 08:44:05 -06:00
nativeBuildInputs = [ ];
propagatedBuildInputs = [ paho-mqtt pyyaml requests pyusb rtlamr rtl-sdr ];
2023-09-12 08:44:05 -06:00
doCheck = false;
doBuild = false;
2023-09-12 08:44:05 -06:00
installPhase = ''
mkdir -p $out/bin
cp rtlamr2mqtt-addon/rtlamr2mqtt.py $out/bin/rtlamr2mqtt
cp rtlamr2mqtt-addon/sdl_ids.txt $out/
'';
2023-09-12 08:44:05 -06:00
src = fetchFromGitHub {
owner = "qbit";
repo = "rtlamr2mqtt";
hash = "sha256-WqW+RZQhwYAIvBAizO3/7SdlhWR9ZIIliEq76XwsUEo=";
rev = "631504e";
};
2023-09-12 08:44:05 -06:00
meta = {
mainProgram = "rtlamr2mqtt";
};
}