<commit_before>{ stdenv, fetchurl, pkgconfig, libxml2, gtk, libSM, shared-mime-info, hicolor-icon-theme }:

let
  version = "2.11";
  name = "rox-filer-${version}";
in stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "mirror://sourceforge/rox/rox-filer-${version}.tar.bz2";
    sha256 = "a929bd32ee18ef7a2ed48b971574574592c42e34ae09f36604bf663d7c101ba8";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ libxml2 gtk shared-mime-info hicolor-icon-theme libSM ];

  patches = [
    ./rox-filer-2.11-in-source-build.patch
  ];

  # go to the source directory after unpacking the sources
  setSourceRoot = "export sourceRoot=rox-filer-${version}/ROX-Filer/";

  # patch source with defined patches
  patchFlags = "-p0";

  # patch the main.c to disable the lookup of the APP_DIR environment variable,
  # which is used to lookup the location for certain images when rox-filer
  # starts; rather override the location with an absolute path to the directory
  # where images are stored to prevent having to use a wrapper, which sets the
  # APP_DIR environment variable prior to starting rox-filer<commit_msg>rox-filer: link with lib{dl,m} explicitly<commit_after>{ stdenv, fetchurl, pkgconfig, libxml2, gtk, libSM, shared-mime-info, hicolor-icon-theme }:

let
  version = "2.11";
  name = "rox-filer-${version}";
in stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "mirror://sourceforge/rox/rox-filer-${version}.tar.bz2";
    sha256 = "a929bd32ee18ef7a2ed48b971574574592c42e34ae09f36604bf663d7c101ba8";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ libxml2 gtk shared-mime-info hicolor-icon-theme libSM ];
  NIX_LDFLAGS = [ "-ldl" "-lm" ];

  patches = [
    ./rox-filer-2.11-in-source-build.patch
  ];

  # go to the source directory after unpacking the sources
  setSourceRoot = "export sourceRoot=rox-filer-${version}/ROX-Filer/";

  # patch source with defined patches
  patchFlags = "-p0";

  # patch the main.c to disable the lookup of the APP_DIR environment variable,
  # which is used to lookup the location for certain images when rox-filer
  # starts; rather override the location with an absolute path to the directory
  # where images are stored to prevent having to use a wrapper, which sets the
  # APP_DIR environment variable prior to starting rox-filer
{'fraction_non_alphanumeric': 0.10429184549356223, 'fraction_numerical': 0.04721030042918455, 'mean_word_length': 3.9177215189873418, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2964411', 'n_tokens_mistral': 853, 'n_tokens_neox': 774, 'n_words': 226}