<commit_before>{ stdenv, fetchurl, cmake, libusb1 }:

# IMPORTANT: You need permissions to access the stlink usb devices. 
# Add services.udev.pkgs = [ pkgs.stlink ] to your configuration.nix

let
  version = "1.3.0";
in
stdenv.mkDerivation {
  name = "stlink-${version}";

  src = fetchurl {
    url = "https://github.com/texane/stlink/archive/${version}.tar.gz";
    sha256 = "3e8cba21744d2c38a0557f6835a05189e1b98202931bb0183d22efc462c893dd";
  };

  buildInputs = [ cmake libusb1 ];
  patchPhase = ''
    sed -i 's@/etc/udev/rules.d@$ENV{out}/etc/udev/rules.d@' CMakeLists.txt
    sed -i 's@/etc/modprobe.d@$ENV{out}/etc/modprobe.d@' CMakeLists.txt
  '';
  preInstall = ''
    mkdir -p $out/etc/udev/rules.d
    mkdir -p $out/etc/modprobe.d
  '';

  meta = with stdenv.lib; {
    description = "In-circuit debug and programming for ST-Link devices";
    license = licenses.bsd3;
    platforms = platforms.unix;
    maintainers = [ maintainers.bjornfor maintainers.rongcuid ];
  };
}
<commit_msg>stlink: 1.3.0 -> 1.5.1<commit_after>{ stdenv, fetchFromGitHub, cmake, libusb1 }:

# IMPORTANT: You need permissions to access the stlink usb devices. 
# Add services.udev.pkgs = [ pkgs.stlink ] to your configuration.nix

let
  version = "1.5.1";
in
stdenv.mkDerivation {
  name = "stlink-${version}";

  src = fetchFromGitHub {
    owner = "texane";
    repo = "stlink";
    rev = "v1.5.1";
    sha256 = "<KEY>";
  };

  buildInputs = [ cmake libusb1 ];
  patchPhase = ''
    sed -i 's@/etc/udev/rules.d@$ENV{out}/etc/udev/rules.d@' CMakeLists.txt
    sed -i 's@/etc/modprobe.d@$ENV{out}/etc/modprobe.d@' CMakeLists.txt
  '';
  preInstall = ''
    mkdir -p $out/etc/udev/rules.d
    mkdir -p $out/etc/modprobe.d
  '';

  meta = with stdenv.lib; {
    description = "In-circuit debug and programming for ST-Link devices";
    license = licenses.bsd3;
    platforms = platforms.unix;
    maintainers = [ maintainers.bjornfor maintainers.rongcuid ];
  };
}

{'fraction_non_alphanumeric': 0.15360983102918588, 'fraction_numerical': 0.03635432667690732, 'mean_word_length': 3.211206896551724, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '5146240', 'n_tokens_mistral': 814, 'n_tokens_neox': 764, 'n_words': 148}