<commit_before>{ stdenv, fetchFromGitHub, asciidoc-full, gettext
, gobjectIntrospection, gtk3, hicolor_icon_theme, libnotify, librsvg
, pythonPackages, udisks2, wrapGAppsHook }:

pythonPackages.buildPythonApplication rec {
  name = "udiskie-${version}";
  version = "1.5.1";

  src = fetchFromGitHub {
    owner = "coldfix";
    repo = "udiskie";
    rev = version;
    sha256 = "01x5fvllb262x6r3547l23z7p6hr7ddz034bkhmj2cqmf83sxwxd";
  };

  buildInputs = [
    asciidoc-full        # For building man page.
    hicolor_icon_theme
    wrapGAppsHook
    librsvg              # required for loading svg icons (udiskie uses svg icons)
  ];

  propagatedBuildInputs = [
    gettext gobjectIntrospection gtk3 libnotify pythonPackages.docopt
    pythonPackages.pygobject3 pythonPackages.pyyaml udisks2
  ];

  postBuild = "make -C doc";

  postInstall = ''
    mkdir -p $out/share/man/man8<commit_msg>udiskie: 1.5.1 -> 1.7.0<commit_after>{ stdenv, fetchFromGitHub, asciidoc-full, gettext
, gobjectIntrospection, gtk3, hicolor_icon_theme, libnotify, librsvg
, pythonPackages, udisks2, wrapGAppsHook }:

pythonPackages.buildPythonApplication rec {
  name = "udiskie-${version}";
  version = "1.7.0";

  src = fetchFromGitHub {
    owner = "coldfix";
    repo = "udiskie";
    rev = version;
    sha256 = "1dvfhf0d79al0vnrwdknfiy2297m3f7fgn7syr85p29hd6260jnv";
  };

  buildInputs = [
    asciidoc-full        # For building man page.
    hicolor_icon_theme
    wrapGAppsHook
    librsvg              # required for loading svg icons (udiskie uses svg icons)
  ];

  propagatedBuildInputs = [
    gettext gobjectIntrospection gtk3 libnotify pythonPackages.docopt
    pythonPackages.pygobject3 pythonPackages.pyyaml udisks2
  ];

  postBuild = "make -C doc";

  postInstall = ''
    mkdir -p $out/share/man/man8
{'fraction_non_alphanumeric': 0.0948945615982242, 'fraction_numerical': 0.03995560488346282, 'mean_word_length': 3.5877862595419847, 'pattern_counts': {'":': 0, '<': 3, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4217958', 'n_tokens_mistral': 713, 'n_tokens_neox': 658, 'n_words': 129}