<commit_before>{ stdenv, fetchurl, pkgconfig, cairo, expat, ncurses, libX11 }:

stdenv.mkDerivation rec {
  name = "hwloc-1.3";

  src = fetchurl {
    url = "http://www.open-mpi.org/software/hwloc/v1.3/downloads/${name}.tar.bz2";
    sha256 = "10zlz0hng7scjx1xn8jflx3gbga5djbhxhj94k5kszrivc8zh8xy";
  };

  # XXX: libX11 is not directly needed, but needed as a propagated dep of Cairo.
  buildInputs = [ pkgconfig cairo expat ncurses libX11 ];

  doCheck = true;

  meta = {
    description = "hwloc, a portable abstraction of hierarchical architectures for high-performance computing";

    longDescription = ''
       hwloc provides a portable abstraction (across OS,
       versions, architectures, ...) of the hierarchical topology of
       modern architectures, including NUMA memory nodes, sockets,
       shared caches, cores and simultaneous multithreading.  It also
       gathers various attributes such as cache and memory
       information.  It primarily aims at helping high-performance<commit_msg>hwloc: Make it easy to disable optional dependencies; fix cross-builds.<commit_after>{ stdenv, fetchurl, pkgconfig, cairo, expat, ncurses, libX11 }:

stdenv.mkDerivation rec {
  name = "hwloc-1.3";

  src = fetchurl {
    url = "http://www.open-mpi.org/software/hwloc/v1.3/downloads/${name}.tar.bz2";
    sha256 = "10zlz0hng7scjx1xn8jflx3gbga5djbhxhj94k5kszrivc8zh8xy";
  };

  # XXX: libX11 is not directly needed, but needed as a propagated dep of Cairo.
  buildNativeInputs = [ pkgconfig ];

  # Filter out `null' inputs.  This allows users to `.override' the
  # derivation and set optional dependencies to `null'.
  buildInputs = stdenv.lib.filter (x: x != null)
   [ cairo expat ncurses libX11 ];

  doCheck = true;

  meta = {
    description = "hwloc, a portable abstraction of hierarchical architectures for high-performance computing";

    longDescription = ''
       hwloc provides a portable abstraction (across OS,
       versions, architectures, ...) of the hierarchical topology of
       modern architectures, including NUMA memory nodes, sockets,
       shared caches, cores and simultaneous multithreading.  It also
       gathers various attributes such as cache and memory
       information.  It primarily aims at helping high-performance
{'fraction_non_alphanumeric': 0.08619173262972735, 'fraction_numerical': 0.023746701846965697, 'mean_word_length': 3.6052631578947367, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5002237', 'n_tokens_mistral': 762, 'n_tokens_neox': 686, 'n_words': 224}