summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/rpi/433Utils/default.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-10-23 21:02:02 +0200
committermakefu <github@syntax-fehler.de>2020-10-23 21:02:02 +0200
commite8b6cc0587929a7ebd0d00f83d298640b20b055f (patch)
treee0f813b8264119a84d6b8c32fa68041c8541ab59 /tv/5pkgs/rpi/433Utils/default.nix
parentfd41a76d4cab2765f9ef95ce5322b7bffe52b8a7 (diff)
parent242530680d5dcb37a5a023d0b8f6155ab441cead (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'tv/5pkgs/rpi/433Utils/default.nix')
-rw-r--r--tv/5pkgs/rpi/433Utils/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/tv/5pkgs/rpi/433Utils/default.nix b/tv/5pkgs/rpi/433Utils/default.nix
new file mode 100644
index 000000000..78be6de35
--- /dev/null
+++ b/tv/5pkgs/rpi/433Utils/default.nix
@@ -0,0 +1,42 @@
+{ fetchFromGitHub, stdenv
+, wiringPi ? WiringPi.wiringPi
+, wiringPiDev ? WiringPi.wiringPiDev
+, WiringPi ? rpiPackages.WiringPi
+, rpiPackages
+}:
+
+stdenv.mkDerivation {
+ pname = "433Utils-RPi_utils";
+ version = "2018-06-07";
+
+ src = fetchFromGitHub (stdenv.lib.importJSON ./src.json);
+
+ 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
+ '';
+}