<commit_before>{ stdenv
, buildPythonPackage
, fetchTritonPatch
, fetchurl

, pkgs
, pythonPackages
}:

stdenv.mkDerivation rec {
  name = "notify-python-0.1.1";

  src = fetchurl {
    url = "http://www.galago-project.org/files/releases/source/notify-python/"
      + "${name}.tar.bz2";
    sha256 = "7d3bbb7c3d8f56c922cc31d02ef9057a4f06998cc2fd4f3119a576fcf8d504ce";
  };

  buildInputs = [
    pkgs.libnotify
    pythonPackages.pygtk
    pythonPackages.python
  ];

  patches = [
    (fetchTritonPatch {
      rev = "44001868689137b1caf38c410f411c0434b20eb0";
      file = "notify-python/notify-python-0.1.1-libnotify-0.7.patch";
      sha256 = "2ced9909d30f0873ea5b048d65552b02e846beeb09346555e2271e42613d9028";
    })
  ];

  postPatch = ''
    # Remove the old pynotify.c to ensure it's properly regenerated, gentoo:#212128.
    rm -fv src/pynotify.c

    sed -i configure \
      -e '/^PYGTK_CODEGEN/s|=.*|="${pythonPackages.pygtk}/bin/pygtk-codegen-2.0"|'
  '';

  postInstall = ''
    pushd $out/lib/python*/site-packages
      ln -s gtk-*/pynotify .
    popd
  '';
<commit_msg>notify-python: refactor & add multihash<commit_after>{ stdenv
, buildPythonPackage
, fetchTritonPatch
, fetchurl

, libnotify
, pygtk
, python
}:

stdenv.mkDerivation rec {
  name = "notify-python-0.1.1";

  src = fetchurl {
    url = "http://www.galago-project.org/files/releases/source/notify-python/"
      + "${name}.tar.bz2";
    multihash = "QmR6QMACtcHr8hBbCg1MZgJ5CwMXTRbrjkQiECUFDQm7rL";
    sha256 = "7d3bbb7c3d8f56c922cc31d02ef9057a4f06998cc2fd4f3119a576fcf8d504ce";
  };

  buildInputs = [
    libnotify
    pygtk
    python
  ];

  patches = [
    (fetchTritonPatch {
      rev = "44001868689137b1caf38c410f411c0434b20eb0";
      file = "notify-python/notify-python-0.1.1-libnotify-0.7.patch";
      sha256 = "2ced9909d30f0873ea5b048d65552b02e846beeb09346555e2271e42613d9028";
    })
  ];

  postPatch = ''
    # Remove the old pynotify.c to ensure it's properly regenerated, gentoo:#212128.
    rm -fv src/pynotify.c

    sed -i configure \
      -e '/^PYGTK_CODEGEN/s|=.*|="${pygtk}/bin/pygtk-codegen-2.0"|'
  '';

  postInstall = ''
    pushd $out/lib/python*/site-packages
      ln -sv gtk-*/pynotify .
    popd
  '';

{'fraction_non_alphanumeric': 0.13591359135913592, 'fraction_numerical': 0.12466246624662466, 'mean_word_length': 3.1864406779661016, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '514936', 'n_tokens_mistral': 1100, 'n_tokens_neox': 932, 'n_words': 118}