From ecb560bf473b89136e48fce1bfea596e3a76fc38 Mon Sep 17 00:00:00 2001 From: Fabian Geiselhart Date: Mon, 29 Jun 2020 19:45:06 +0200 Subject: [PATCH] platformio: Put udev rules into package output --- pkgs/development/arduino/platformio/chrootenv.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/arduino/platformio/chrootenv.nix b/pkgs/development/arduino/platformio/chrootenv.nix index 01a2fb873aa..62a1d190a00 100644 --- a/pkgs/development/arduino/platformio/chrootenv.nix +++ b/pkgs/development/arduino/platformio/chrootenv.nix @@ -1,4 +1,4 @@ -{ lib, buildFHSUserEnv }: +{ lib, buildFHSUserEnv, fetchFromGitHub }: let pio-pkgs = pkgs: @@ -19,6 +19,14 @@ let platformio ]); + src = fetchFromGitHub { + owner = "platformio"; + repo = "platformio-core"; + rev = "v4.3.4"; + sha256 = "0vf2j79319ypr4yrdmx84853igkb188sjfvlxgw06rlsvsm3kacq"; + }; + + in buildFHSUserEnv { name = "platformio"; @@ -34,7 +42,10 @@ in buildFHSUserEnv { }; extraInstallCommands = '' + mkdir -p $out/lib/udev/rules.d + ln -s $out/bin/platformio $out/bin/pio + ln -s ${src}/scripts/99-platformio-udev.rules $out/lib/udev/rules.d/99-platformio-udev.rules ''; runScript = "platformio";