<commit_before>{ stdenv, fetchFromGitHub, bash }:

stdenv.mkDerivation rec {
  name = "incron-0.5.12";
  src = fetchFromGitHub {
    owner = "ar-";
    repo = "incron";
    rev = "incron-0.5.12";
    sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih";
  };

  patches = [ ./default_path.patch ];

  prePatch = ''
    sed -i "s|PREFIX = /usr/local|PREFIX = $out|g" Makefile
    sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp
  '';

  installPhase = ''
    mkdir -p $out/bin

    # make install doesn't work because setuid and permissions
    # just manually install the binaries instead
    cp incrond incrontab $out/bin/

    # make install-man is fine for documentation
    make install-man
  '';

  meta = with stdenv.lib; {
    description = "A daemon which monitors filesystem events and executes commands defined in system and user tables";
    homepage = https://github.com/ar-/incron;
    license = licenses.gpl2;
    maintainers = [ maintainers.aanderse ];
    platforms = platforms.linux;<commit_msg>some cleanup of the package .nix file as recommended by @jtojnar<commit_after>{ stdenv, fetchFromGitHub, bash }:

stdenv.mkDerivation rec {
  name = "incron-0.5.12";
  src = fetchFromGitHub {
    owner = "ar-";
    repo = "incron";
    rev = "incron-0.5.12";
    sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih";
  };

  patches = [ ./default_path.patch ];

  prePatch = ''
    sed -i "s|PREFIX = /usr/local|PREFIX = $out|g" Makefile
    sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp
  '';

  installFlags = [ "PREFIX=$(out)" ];
  installTargets = [ "install-man" ];

  preInstall = ''
    mkdir -p $out/bin

    # make install doesn't work because setuid and permissions
    # just manually install the binaries instead
    cp incrond incrontab $out/bin/
  '';

  meta = with stdenv.lib; {
    description = "A daemon which monitors filesystem events and executes commands defined in system and user tables";
    homepage = https://github.com/ar-/incron;
    license = licenses.gpl2;
    maintainers = [ maintainers.aanderse ];
    platforms = platforms.linux;
{'fraction_non_alphanumeric': 0.12588736393752958, 'fraction_numerical': 0.02744912446758164, 'mean_word_length': 3.177865612648221, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6798293', 'n_tokens_mistral': 793, 'n_tokens_neox': 740, 'n_words': 181}