platformio: Put udev rules into package output
This commit is contained in:
parent
2101f7361c
commit
ecb560bf47
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue