<commit_before>{ lib, buildPythonPackage, fetchPypi, fetchpatch, pyusb }:

buildPythonPackage rec {
  pname = "BlinkStick";
  version = "1.1.8";

  src = fetchPypi {
    inherit pname version;
    sha256 = "3edf4b83a3fa1a7bd953b452b76542d54285ff6f1145b6e19f9b5438120fa408";
  };

  patches = [
    (fetchpatch {
      url = "https://github.com/arvydas/blinkstick-python/commit/a9227d0.patch";
      sha256 = "1mcmxlnkbfxwp84qz32l5rlc7r9anh9yhnqaj1y8rny5s13jb01f";
    })
    (fetchpatch {
      url = "https://github.com/arvydas/blinkstick-python/pull/54.patch";
      sha256 = "1gjq6xbai794bbdyrv82i96l1a7qkwvlhzd6sa937dy5ivv6s6hl";
    })
  ];

  propagatedBuildInputs = [ pyusb ];

  meta = with lib; {
    description = "Python package to control BlinkStick USB devices";
    homepage = "https://pypi.python.org/pypi/BlinkStick/";
    license = licenses.bsd3;
    maintainers = with maintainers; [ np ];
  };
}
<commit_msg>python3Packages.blinkstick: 1.1.8 -> 1.2.0<commit_after>{ lib
, buildPythonPackage
, fetchPypi
, pyusb
}:

buildPythonPackage rec {
  pname = "BlinkStick";
  version = "1.2.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "0rdk3i81s6byw23za0bxvkh7sj5l16qxxgc2c53qjg3klc24wcm9";
  };

  # Upstream fix https://github.com/arvydas/blinkstick-python/pull/54
  # https://github.com/arvydas/blinkstick-python/pull/54/commits/b9bee2cd72f799f1210e5d9e13207f93bbc2d244.patch
  # has line ending issues after 1.2.0
  postPatch = ''
    substituteInPlace setup.py --replace "pyusb==1.0.0" "pyusb>=1.0.0"
  '';

  propagatedBuildInputs = [ pyusb ];

  # Project has no tests
  doCheck = false;
  pythonImportsCheck = [ "blinkstick" ];

  meta = with lib; {
    description = "Python package to control BlinkStick USB devices";
    homepage = "https://github.com/arvydas/blinkstick-python";
    license = licenses.bsd3;
    maintainers = with maintainers; [ np ];
  };
}

{'fraction_non_alphanumeric': 0.1251972645975802, 'fraction_numerical': 0.0873224618621778, 'mean_word_length': 3.673218673218673, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, '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': '7316746', 'n_tokens_mistral': 846, 'n_tokens_neox': 763, 'n_words': 116}