anchor.diff: -{ fetchurl, stdenv, fetchpatch, intltool, pkgconfig, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk_pixbuf
  -, modemmanager, avahi, glib-networking, wrapGAppsHook, gobjectIntrospection
  +{ stdenv, fetchFromGitLab, meson, ninja, pkgconfig, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk_pixbuf
  +, modemmanager, avahi, glib-networking, python3, wrapGAppsHook, gobjectIntrospection, vala
   , withDemoAgent ? false
   }:
   
  
positive.code: 
  stdenv.mkDerivation rec {
    name = "geoclue-${version}";
    version = "2.4.12";
  
    src = fetchurl {
      url = "https://www.freedesktop.org/software/geoclue/releases/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
      sha256 = "1jnad1f3rf8h05sz1lc172jnqdhqdpz76ff6m7i5ss3s0znf5l05";
    };
  
    outputs = [ "out" "dev" "devdoc" ];
  
    nativeBuildInputs = [
      pkgconfig intltool wrapGAppsHook gobjectIntrospection
      # devdoc
      gtk-doc docbook_xsl docbook_xml_dtd_412
    ];
  
negative.code: 
    propagatedBuildInputs = [ glib glib-networking ];
  
    mesonFlags = [
      "-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
      "-Ddemo-agent=${if withDemoAgent then "true" else "false"}"
    ] ++ optionals stdenv.isDarwin [
      "-D3g-source=false"
      "-Dcdma-source=false"
      "-Dmodem-gps-source=false"
      "-Dnmea-source=false"
    ];
  
    postPatch = ''
      chmod +x demo/install-file.py
      patchShebangs demo/install-file.py
    '';
  
    meta = with stdenv.lib; {
      description = "Geolocation framework and some data providers";
  