anchor.diff:  
     propagatedBuildInputs = [ glib glib-networking ];
   
  -  # Whitelist elementary's agent
  -  patches = [
  -    (fetchpatch {
  -      url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/2b0491e408be1ebcdbe8751bb2637c1acb78f71e.patch";
  -      sha256 = "0pac94y55iksk340dlx3gkhb9lrci90mxqqy5fnh1zbjw9bqxfn4";
  -    })
  +  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"
     ];
   
  -  configureFlags = [
  -    "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
  -    "--enable-introspection"
  -    "--enable-gtk-doc"
  -    "--enable-demo-agent=${if withDemoAgent then "yes" else "no"}"
  -  ] ++ optionals stdenv.isDarwin [
  -    "--disable-silent-rules"
  -    "--disable-3g-source"
  -    "--disable-cdma-source"
  -    "--disable-modem-gps-source"
  -    "--disable-nmea-source"
  -  ];
  +  postPatch = ''
  +    chmod +x demo/install-file.py
  +    patchShebangs demo/install-file.py
  +  '';
   
     meta = with stdenv.lib; {
       description = "Geolocation framework and some data providers";
  
positive.code: { 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
  , withDemoAgent ? false
  }:
  
  
negative.code: 
  stdenv.mkDerivation rec {
    name = "geoclue-${version}";
    version = "2.5.1";
  
    src = fetchFromGitLab {
      domain = "gitlab.freedesktop.org";
      owner = "geoclue";
      repo = "geoclue";
      rev = version;
      sha256 = "0vww6irijw5ss7vawkdi5z5wdpcgw4iqljn5vs3vbd4y3d0lzrbs";
    };
  
    outputs = [ "out" "dev" "devdoc" ];
  
    nativeBuildInputs = [
      pkgconfig meson ninja wrapGAppsHook python3 vala gobjectIntrospection
      # devdoc
      gtk-doc docbook_xsl docbook_xml_dtd_412
    ];
  