<commit_before>{ stdenv, fetchurl, pkgconfig, intltool, file, makeWrapper
, openssl, curl, libevent, inotifyTools
, enableGTK3 ? false, gtk3
}:

let
  version = "2.82";
in

with { inherit (stdenv.lib) optional optionals optionalString; };

stdenv.mkDerivation rec {
  name = "transmission-" + optionalString enableGTK3 "gtk-" + version;

  src = fetchurl {
    url = "http://download.transmissionbt.com/files/transmission-${version}.tar.xz";
    sha256 = "08imy28hpjxwdzgvhm66hkfyzp8qnnqr4jhv3rgshryzhw86b5ir";
  };

  buildInputs = [ pkgconfig intltool file openssl curl libevent inotifyTools ]
    ++ optionals enableGTK3 [ gtk3 makeWrapper ];

  preConfigure = ''
    sed -i -e 's|/usr/bin/file|${file}/bin/file|g' configure
  '';

  configureFlags = [ "--with-systemd-daemon" ]
    ++ optional enableGTK3 "--with-gtk";

  postInstall = optionalString enableGTK3 /* gsettings schemas for file dialogues */ ''
    rm "$out/share/icons/hicolor/icon-theme.cache"
    wrapProgram "$out/bin/transmission-gtk" \
      --prefix XDG_DATA_DIRS : "${gtk3}/share"
  '';

  meta = with stdenv.lib; {
    description = "A fast, easy and free BitTorrent client";<commit_msg>transmission-gtk: fix gsettings schemas, closes #2295<commit_after>{ stdenv, fetchurl, pkgconfig, intltool, file, makeWrapper
, openssl, curl, libevent, inotifyTools
, enableGTK3 ? false, gtk3
}:

let
  version = "2.82";
in

with { inherit (stdenv.lib) optional optionals optionalString; };

stdenv.mkDerivation rec {
  name = "transmission-" + optionalString enableGTK3 "gtk-" + version;

  src = fetchurl {
    url = "http://download.transmissionbt.com/files/transmission-${version}.tar.xz";
    sha256 = "<KEY>";
  };

  buildInputs = [ pkgconfig intltool file openssl curl libevent inotifyTools ]
    ++ optionals enableGTK3 [ gtk3 makeWrapper ];

  preConfigure = ''
    sed -i -e 's|/usr/bin/file|${file}/bin/file|g' configure
  '';

  configureFlags = [ "--with-systemd-daemon" ]
    ++ optional enableGTK3 "--with-gtk";

  preFixup = optionalString enableGTK3 /* gsettings schemas for file dialogues */ ''
    rm "$out/share/icons/hicolor/icon-theme.cache"
    wrapProgram "$out/bin/transmission-gtk" \
      --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
  '';

  meta = with stdenv.lib; {
    description = "A fast, easy and free BitTorrent client";
{'fraction_non_alphanumeric': 0.1362854686156492, 'fraction_numerical': 0.018486672398968184, 'mean_word_length': 3.827800829875519, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3831522', 'n_tokens_mistral': 853, 'n_tokens_neox': 806, 'n_words': 178}