<commit_before>{ stdenv, fetchurl, which, pkgconfig, gtk2, pcre, glib, libxml2
, libsoup ? null
}:

stdenv.mkDerivation rec {
  name = "hardinfo-${version}";
  version = "0.5.1";

  src = fetchurl {
    url = "mirror://sourceforge/project/hardinfo.berlios/hardinfo-${version}.tar.bz2";
    sha256 = "0yhvfc5icam3i4mphlz0m9d9d2irjw8mbsxq203x59wjgh6nrpx0";
  };

  # Not adding 'hostname' command, the build shouldn't depend on what the build
  # host is called.
  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ which gtk2 pcre glib libxml2 libsoup ];

  # Fixes '#error You must compile this program without "-O"'
  hardeningDisable = [ "all" ];

  preConfigure = ''
    patchShebangs configure

    # -std=gnu89 fixes build error, copied from
    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757525
    sed -i -e "s/^CFLAGS = \(.*\)/CFLAGS = \1 -std=gnu89/" Makefile.in

    substituteInPlace ./arch/linux/common/modules.h --replace /sbin/modinfo modinfo
  '';

  # Makefile supports DESTDIR but not PREFIX (it hardcodes $DESTDIR/usr/).
  installFlags = [ "DESTDIR=$(out)" ];
  postInstall = ''
    mv "$out/usr/"* "$out"
    rmdir "$out/usr"
  '';

  meta = with stdenv.lib; {
    homepage = http://hardinfo.org/;
    description = "Display information about your hardware and operating system";<commit_msg>hardinfo: fix build with new libsoup<commit_after>{ stdenv, fetchurl, which, pkgconfig, gtk2, pcre, glib, libxml2
, libsoup ? null
}:

stdenv.mkDerivation rec {
  name = "hardinfo-${version}";
  version = "0.5.1";

  src = fetchurl {
    url = "mirror://sourceforge/project/hardinfo.berlios/hardinfo-${version}.tar.bz2";
    sha256 = "0yhvfc5icam3i4mphlz0m9d9d2irjw8mbsxq203x59wjgh6nrpx0";
  };

  # Not adding 'hostname' command, the build shouldn't depend on what the build
  # host is called.
  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ which gtk2 pcre glib libxml2 libsoup ];

  # Fixes '#error You must compile this program without "-O"'
  hardeningDisable = [ "all" ];

  # Ignore undefined references to a bunch of libsoup symbols
  NIX_LDFLAGS = "--unresolved-symbol=ignore-all";

  preConfigure = ''
    patchShebangs configure

    # -std=gnu89 fixes build error, copied from
    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757525
    sed -i -e "s/^CFLAGS = \(.*\)/CFLAGS = \1 -std=gnu89/" Makefile.in

    substituteInPlace ./arch/linux/common/modules.h --replace /sbin/modinfo modinfo
  '';

  # Makefile supports DESTDIR but not PREFIX (it hardcodes $DESTDIR/usr/).
  installFlags = [ "DESTDIR=$(out)" ];
  postInstall = ''
    mv "$out/usr/"* "$out"
    rmdir "$out/usr"
  '';

  meta = with stdenv.lib; {
    homepage = http://hardinfo.org/;
    description = "Display information about your hardware and operating system";
{'fraction_non_alphanumeric': 0.13858891288696903, 'fraction_numerical': 0.027357811375089993, 'mean_word_length': 3.4967637540453076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6873174', 'n_tokens_mistral': 1050, 'n_tokens_neox': 992, 'n_words': 239}