<commit_before>{ lib, buildFHSUserEnv }:

let
  pio-pkgs = pkgs:
    let
      python = pkgs.python.override {
        packageOverrides = self: super: {

          # https://github.com/platformio/platformio-core/issues/349
          click = super.click.overridePythonAttrs (oldAttrs: rec {
            version = "5.1";
            src = oldAttrs.src.override {
              inherit version;
              sha256 = "678c98275431fad324275dec63791e4a17558b40e5a110e20a82866139a85a5a";
            };
          });

          platformio = self.callPackage ./core.nix { };
        };
      };
    in (with pkgs; [
      zlib
    ]) ++ (with python.pkgs; [
      python
      setuptools
      pip
      bottle
      platformio
    ]);

in buildFHSUserEnv {
  name = "platformio";

  targetPkgs = pio-pkgs;
  multiPkgs = pio-pkgs;

  meta = with lib; {
    description = "An open source ecosystem for IoT development";
    homepage = http://platformio.org;<commit_msg>platformio: add git to chroot so it is usable by platformio command<commit_after>{ lib, buildFHSUserEnv }:

let
  pio-pkgs = pkgs:
    let
      python = pkgs.python.override {
        packageOverrides = self: super: {

          # https://github.com/platformio/platformio-core/issues/349
          click = super.click.overridePythonAttrs (oldAttrs: rec {
            version = "5.1";
            src = oldAttrs.src.override {
              inherit version;
              sha256 = "678c98275431fad324275dec63791e4a17558b40e5a110e20a82866139a85a5a";
            };
          });

          platformio = self.callPackage ./core.nix { };
        };
      };
    in (with pkgs; [
      zlib
      git
    ]) ++ (with python.pkgs; [
      python
      setuptools
      pip
      bottle
      platformio
    ]);

in buildFHSUserEnv {
  name = "platformio";

  targetPkgs = pio-pkgs;
  multiPkgs = pio-pkgs;

  meta = with lib; {
    description = "An open source ecosystem for IoT development";
    homepage = http://platformio.org;
{'fraction_non_alphanumeric': 0.10412474849094568, 'fraction_numerical': 0.05533199195171026, 'mean_word_length': 1.9642324888226528, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3011733', 'n_tokens_mistral': 724, 'n_tokens_neox': 649, 'n_words': 131}