Skip to content

Commit

Permalink
Merge pull request #275394 from pedorich-n/platformio-completion
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 authored Dec 19, 2023
2 parents 9503015 + 003d43d commit bfd600c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkgs/development/embedded/platformio/core.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, python3Packages
, fetchFromGitHub
, fetchpatch
, installShellFiles
, git
, spdx-license-list-data
, substituteAll
Expand Down Expand Up @@ -43,6 +44,7 @@ with python3Packages; buildPythonApplication rec {
];

nativeBuildInputs = [
installShellFiles
pythonRelaxDepsHook
setuptools
];
Expand Down Expand Up @@ -88,6 +90,16 @@ with python3Packages; buildPythonApplication rec {
postInstall = ''
mkdir -p $udev/lib/udev/rules.d
cp platformio/assets/system/99-platformio-udev.rules $udev/lib/udev/rules.d/99-platformio-udev.rules
installShellCompletion --cmd platformio \
--bash <(_PLATFORMIO_COMPLETE=bash_source $out/bin/platformio) \
--zsh <(_PLATFORMIO_COMPLETE=zsh_source $out/bin/platformio) \
--fish <(_PLATFORMIO_COMPLETE=fish_source $out/bin/platformio)
installShellCompletion --cmd pio \
--bash <(_PIO_COMPLETE=bash_source $out/bin/pio) \
--zsh <(_PIO_COMPLETE=zsh_source $out/bin/pio) \
--fish <(_PIO_COMPLETE=fish_source $out/bin/pio)
'';

disabledTestPaths = [
Expand Down Expand Up @@ -186,5 +198,6 @@ with python3Packages; buildPythonApplication rec {
homepage = "https://platformio.org";
license = licenses.asl20;
maintainers = with maintainers; [ mog makefu ];
mainProgram = "platformio";
};
}

0 comments on commit bfd600c

Please sign in to comment.