<commit_before>{ stdenv, fetchurl, intltool, pkgconfig, dbus_glib
, udev, libnl, libuuid, gnutls, dhcp
, libgcrypt, perl }:

stdenv.mkDerivation rec {
  name = "network-manager-${version}";
  version = "0.9.8.10";

  src = fetchurl {
    url = "mirror://gnome/sources/NetworkManager/0.9/NetworkManager-${version}.tar.xz";
    sha256 = "0wn9qh8r56r8l19dqr68pdl1rv3zg1dv47rfy6fqa91q7li2fk86";
  };

  preConfigure = ''
    substituteInPlace tools/glib-mkenums --replace /usr/bin/perl ${perl}/bin/perl
  '';

  # Right now we hardcode quite a few paths at build time. Probably we should
  # patch networkmanager to allow passing these path in config file. This will
  # remove unneeded build-time dependencies.
  configureFlags = [
    "--with-distro=exherbo"
    "--with-dhclient=${dhcp}/sbin/dhclient"
    "--with-dhcpcd=no"
    "--with-iptables=no"
    "--with-udev-dir=\${out}/lib/udev"
    "--with-resolvconf=no"
    "--sysconfdir=/etc" "--localstatedir=/var"
    "--with-dbus-sys-dir=\${out}/etc/dbus-1/system.d"
    "--with-crypto=gnutls" "--disable-more-warnings"
    "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
    "--with-kernel-firmware-dir=/run/current-system/firmware"
    "--disable-ppp"
  ];

  buildInputs = [ udev libnl libuuid gnutls libgcrypt ];

  propagatedBuildInputs = [ dbus_glib ];

  nativeBuildInputs = [ intltool pkgconfig ];

  patches =
    [ ./libnl-3.2.25.patch
      ./nixos-purity.patch
    ];

  preInstall =
    ''
      installFlagsArray=( "sysconfdir=$out/etc" "localstatedir=$out/var" )
    '';

  meta = with stdenv.lib; {
    homepage = http://projects.gnome.org/NetworkManager/;
    description = "Network configuration and management tool";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;<commit_msg>networkmanager098: add libgudev<commit_after>{ stdenv, fetchurl, intltool, pkgconfig, dbus_glib
, udev, libnl, libuuid, gnutls, dhcp
, libgcrypt, perl, libgudev }:

stdenv.mkDerivation rec {
  name = "network-manager-${version}";
  version = "0.9.8.10";

  src = fetchurl {
    url = "mirror://gnome/sources/NetworkManager/0.9/NetworkManager-${version}.tar.xz";
    sha256 = "0wn9qh8r56r8l19dqr68pdl1rv3zg1dv47rfy6fqa91q7li2fk86";
  };

  preConfigure = ''
    substituteInPlace tools/glib-mkenums --replace /usr/bin/perl ${perl}/bin/perl
  '';

  # Right now we hardcode quite a few paths at build time. Probably we should
  # patch networkmanager to allow passing these path in config file. This will
  # remove unneeded build-time dependencies.
  configureFlags = [
    "--with-distro=exherbo"
    "--with-dhclient=${dhcp}/sbin/dhclient"
    "--with-dhcpcd=no"
    "--with-iptables=no"
    "--with-udev-dir=\${out}/lib/udev"
    "--with-resolvconf=no"
    "--sysconfdir=/etc" "--localstatedir=/var"
    "--with-dbus-sys-dir=\${out}/etc/dbus-1/system.d"
    "--with-crypto=gnutls" "--disable-more-warnings"
    "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
    "--with-kernel-firmware-dir=/run/current-system/firmware"
    "--disable-ppp"
  ];

  buildInputs = [ udev libnl libuuid gnutls libgcrypt libgudev ];

  propagatedBuildInputs = [ dbus_glib ];

  nativeBuildInputs = [ intltool pkgconfig ];

  patches =
    [ ./libnl-3.2.25.patch
      ./nixos-purity.patch
    ];

  preInstall =
    ''
      installFlagsArray=( "sysconfdir=$out/etc" "localstatedir=$out/var" )
    '';

  meta = with stdenv.lib; {
    homepage = http://projects.gnome.org/NetworkManager/;
    description = "Network configuration and management tool";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
{'fraction_non_alphanumeric': 0.1548783897120492, 'fraction_numerical': 0.02208554654738608, 'mean_word_length': 3.2953181272509005, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6194504', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1290, 'n_words': 221}