2021-06-01 22:23:55 +00:00
|
|
|
{ fetchFromGitHub, lib, stdenv
|
2020-10-15 12:53:14 +00:00
|
|
|
, wiringPi ? WiringPi.wiringPi
|
|
|
|
, wiringPiDev ? WiringPi.wiringPiDev
|
|
|
|
, WiringPi ? rpiPackages.WiringPi
|
|
|
|
, rpiPackages
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "433Utils-RPi_utils";
|
|
|
|
version = "2018-06-07";
|
|
|
|
|
2021-06-01 22:23:55 +00:00
|
|
|
src = fetchFromGitHub (lib.importJSON ./src.json);
|
2020-10-15 12:53:14 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
./rc-switch.protocols.patch
|
|
|
|
./RPi_utils.codesend.codestring.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook postBuild
|
|
|
|
|
|
|
|
make -C RPi_utils
|
|
|
|
|
|
|
|
runHook preBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
wiringPi
|
|
|
|
wiringPiDev
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
for name in send codesend RFSniffer; do
|
|
|
|
cp RPi_utils/$name $out/bin/
|
|
|
|
done
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
}
|