<commit_before>{ stdenv
, fetchurl
, intltool
, makeWrapper

, adwaita-icon-theme
, avahi
, dbus-glib
, dconf
, file
, glib
, gnutls
, gtk
, libgcrypt
, libjpeg
, libnotify
, libsecret
, libsoup
, telepathy_glib
, xorg
, zlib

, channel
}:

assert xorg != null ->
  xorg.libICE != null
  && xorg.libSM != null
  && xorg.libX11 != null
  && xorg.libXext != null
  && xorg.libXtst != null
  && xorg.xproto != null;

let
  inherit (stdenv.lib)
    boolWt
    optionals;

  source = (import ./sources.nix { })."${channel}";
in
stdenv.mkDerivation rec {
  name = "vino-${source.version}";

  src = fetchurl {
    url = "mirror://gnome/sources/vino/${channel}/${name}.tar.xz";
    hashOutput = false;
    inherit (source) sha256;
  };

  nativeBuildInputs = [
    intltool
    makeWrapper
  ];

  buildInputs = [
    adwaita-icon-theme
    avahi
    dbus-glib
    dconf
    file
    glib
    gnutls
    gtk
    libgcrypt
    libjpeg
    libnotify
    libsecret
    libsoup
    telepathy_glib
    zlib
  ] ++ optionals (xorg != null) [
    xorg.libICE
    xorg.libSM
    xorg.libX11
    xorg.libXext
    xorg.libXtst
    xorg.xproto
  ];

  configureFlags = [
    "--disable-maintainer-mode"
    "--enable-compile-warnings"
    "--disable-iso-c"
    "--disable-debug"
    "--enable-nls"
    "--enable-ipv6"
    "--enable-schemas-compile"
    "--${boolWt (telepathy_glib != null)}-telepathy"
    "--${boolWt (libsecret != null)}-secret"
    "--${boolWt (xorg != null)}-x"
    "--${boolWt (gnutls != null)}-gnutls"
    "--${boolWt (libgcrypt != null)}-gcrypt"
    "--${boolWt (avahi != null)}-avahi"
    "--${boolWt (zlib != null)}-zlib"
    "--${boolWt (libjpeg != null)}-jpeg"
  ];

  preFixup = ''
    wrapProgram $out/libexec/vino-server \
      --set 'GSETTINGS_BACKEND' 'dconf' \
      --prefix 'GIO_EXTRA_MODULES' : "$GIO_EXTRA_MODULES" \
      --prefix 'XDG_DATA_DIRS' : "$GSETTINGS_SCHEMAS_PATH" \
      --prefix 'XDG_DATA_DIRS' : "$out/share" \
      --prefix 'XDG_DATA_DIRS' : "$XDG_ICON_DIRS"
  '';

  doCheck = true;

  passthru = {
    srcVerification = fetchurl {
      inherit (src)
        outputHash
        outputHashAlgo
        urls;
      sha256Url = "https://download.gnome.org/sources/vino/${channel}/"
        + "${name}.sha256sum";
      failEarly = true;
    };
  };

  meta = with stdenv.lib; {
    description = "GNOME desktop sharing server";
    homepage = https://wiki.gnome.org/action/show/Projects/Vino;
    license = licenses.gpl2;
    maintainers = with maintainers; [
      codyopel
    ];
    platforms = with platforms;
      x86_64-linux;
  };
}
<commit_msg>vino: update xorg references<commit_after>{ stdenv
, fetchurl
, intltool
, makeWrapper

, adwaita-icon-theme
, avahi
, dbus-glib
, dconf
, file
, glib
, gnutls
, gtk
, libgcrypt
, libice
, libjpeg
, libnotify
, libsecret
, libsm
, libsoup
, libx11
, libxext
, libxtst
, telepathy_glib
, xorgproto
, zlib

, channel
}:

let
  inherit (stdenv.lib)
    boolWt
    optionals;

  source = (import ./sources.nix { })."${channel}";
in
stdenv.mkDerivation rec {
  name = "vino-${source.version}";

  src = fetchurl {
    url = "mirror://gnome/sources/vino/${channel}/${name}.tar.xz";
    hashOutput = false;
    inherit (source) sha256;
  };

  nativeBuildInputs = [
    intltool
    makeWrapper
  ];

  buildInputs = [
    adwaita-icon-theme
    avahi
    dbus-glib
    dconf
    file
    glib
    gnutls
    gtk
    libgcrypt
    libice
    libjpeg
    libnotify
    libsecret
    libsm
    libsoup
    libx11
    libxext
    libxtst
    telepathy_glib
    xorgproto
    zlib
  ];

  configureFlags = [
    "--disable-maintainer-mode"
    "--enable-compile-warnings"
    "--disable-iso-c"
    "--disable-debug"
    "--enable-nls"
    "--enable-ipv6"
    "--enable-schemas-compile"
    "--${boolWt (telepathy_glib != null)}-telepathy"
    "--${boolWt (libsecret != null)}-secret"
    "--${boolWt (libxll != null)}-x"
    "--${boolWt (gnutls != null)}-gnutls"
    "--${boolWt (libgcrypt != null)}-gcrypt"
    "--${boolWt (avahi != null)}-avahi"
    "--${boolWt (zlib != null)}-zlib"
    "--${boolWt (libjpeg != null)}-jpeg"
  ];

  preFixup = ''
    wrapProgram $out/libexec/vino-server \
      --set 'GSETTINGS_BACKEND' 'dconf' \
      --prefix 'GIO_EXTRA_MODULES' : "$GIO_EXTRA_MODULES" \
      --prefix 'XDG_DATA_DIRS' : "$GSETTINGS_SCHEMAS_PATH" \
      --prefix 'XDG_DATA_DIRS' : "$out/share" \
      --prefix 'XDG_DATA_DIRS' : "$XDG_ICON_DIRS"
  '';

  doCheck = true;

  passthru = {
    srcVerification = fetchurl {
      inherit (src)
        outputHash
        outputHashAlgo
        urls;
      sha256Url = "https://download.gnome.org/sources/vino/${channel}/"
        + "${name}.sha256sum";
      failEarly = true;
    };
  };

  meta = with stdenv.lib; {
    description = "GNOME desktop sharing server";
    homepage = https://wiki.gnome.org/action/show/Projects/Vino;
    license = licenses.gpl2;
    maintainers = with maintainers; [
      codyopel
    ];
    platforms = with platforms;
      x86_64-linux;
  };
}

{'fraction_non_alphanumeric': 0.1554269752593775, 'fraction_numerical': 0.007581803671189146, 'mean_word_length': 2.426520847573479, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '5809637', 'n_tokens_mistral': 1995, 'n_tokens_neox': 1930, 'n_words': 336}