Merge pull request #119383 from jtojnar/geoclue-custom-key

geoclue2: Use our own mozilla API key

authored by Michael Raskin and committed by GitHub 3a07a898 bc33b23c

+69 -18
+5 -2
pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch
··· 65 conf.set_quoted('LOCALEDIR', localedir) 66 -conf.set_quoted('SYSCONFDIR', sysconfdir) 67 +conf.set_quoted('SYSCONFDIR', get_option('sysconfdir')) 68 conf.set10('GCLUE_USE_3G_SOURCE', get_option('3g-source')) 69 conf.set10('GCLUE_USE_CDMA_SOURCE', get_option('cdma-source')) 70 - conf.set10('GCLUE_USE_MODEM_GPS_SOURCE', get_option('modem-gps-source')) 71 diff --git a/meson_options.txt b/meson_options.txt 72 index 83bc60e..b726329 100644 73 --- a/meson_options.txt 74 +++ b/meson_options.txt 75 - @@ -34,3 +34,6 @@ option('systemd-system-unit-dir', 76 option('dbus-srv-user', 77 type: 'string', value: 'root', 78 description: 'The user (existing) as which the service will run') 79 +option('sysconfdir_install', 80 + type: 'string', value: '', 81 + description: 'sysconfdir to use during installation')
··· 65 conf.set_quoted('LOCALEDIR', localedir) 66 -conf.set_quoted('SYSCONFDIR', sysconfdir) 67 +conf.set_quoted('SYSCONFDIR', get_option('sysconfdir')) 68 + conf.set_quoted('MOZILLA_API_KEY', get_option('mozilla-api-key')) 69 conf.set10('GCLUE_USE_3G_SOURCE', get_option('3g-source')) 70 conf.set10('GCLUE_USE_CDMA_SOURCE', get_option('cdma-source')) 71 diff --git a/meson_options.txt b/meson_options.txt 72 index 83bc60e..b726329 100644 73 --- a/meson_options.txt 74 +++ b/meson_options.txt 75 + @@ -34,6 +34,9 @@ option('systemd-system-unit-dir', 76 option('dbus-srv-user', 77 type: 'string', value: 'root', 78 description: 'The user (existing) as which the service will run') 79 +option('sysconfdir_install', 80 + type: 'string', value: '', 81 + description: 'sysconfdir to use during installation') 82 + option('mozilla-api-key', 83 + type: 'string', value: 'geoclue', 84 + description: 'Your API key for Mozilla Location Service')
+64 -16
pkgs/development/libraries/geoclue/default.nix
··· 1 - { lib, stdenv, fetchFromGitLab, intltool, meson, ninja, pkg-config, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk-pixbuf 2 - , modemmanager, avahi, glib-networking, python3, wrapGAppsHook, gobject-introspection, vala 3 , withDemoAgent ? false 4 }: 5 6 - with lib; 7 - 8 stdenv.mkDerivation rec { 9 pname = "geoclue"; 10 - version = "2.5.6"; 11 12 src = fetchFromGitLab { 13 domain = "gitlab.freedesktop.org"; 14 owner = pname; 15 repo = pname; 16 rev = version; 17 - sha256 = "13fk6n4j74lvcsrg3kwbw1mkxgcr3iy9dnysmy0pclfsym8z5m5m"; 18 }; 19 20 patches = [ 21 ./add-option-for-installation-sysconfdir.patch 22 ]; 23 24 - outputs = [ "out" "dev" "devdoc" ]; 25 - 26 nativeBuildInputs = [ 27 - pkg-config intltool meson ninja wrapGAppsHook python3 vala gobject-introspection 28 # devdoc 29 - gtk-doc docbook_xsl docbook_xml_dtd_412 30 ]; 31 32 buildInputs = [ 33 - glib json-glib libsoup avahi 34 - ] ++ optionals withDemoAgent [ 35 libnotify gdk-pixbuf 36 - ] ++ optionals (!stdenv.isDarwin) [ modemmanager ]; 37 38 - propagatedBuildInputs = [ glib glib-networking ]; 39 40 mesonFlags = [ 41 "-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system" 42 - "-Ddemo-agent=${boolToString withDemoAgent}" 43 "--sysconfdir=/etc" 44 "-Dsysconfdir_install=${placeholder "out"}/etc" 45 "-Ddbus-srv-user=geoclue" 46 "-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d" 47 - ] ++ optionals stdenv.isDarwin [ 48 "-D3g-source=false" 49 "-Dcdma-source=false" 50 "-Dmodem-gps-source=false"
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitLab 4 + , fetchpatch 5 + , intltool 6 + , meson 7 + , ninja 8 + , pkg-config 9 + , gtk-doc 10 + , docbook-xsl-nons 11 + , docbook_xml_dtd_412 12 + , glib 13 + , json-glib 14 + , libsoup 15 + , libnotify 16 + , gdk-pixbuf 17 + , modemmanager 18 + , avahi 19 + , glib-networking 20 + , python3 21 + , wrapGAppsHook 22 + , gobject-introspection 23 + , vala 24 , withDemoAgent ? false 25 }: 26 27 stdenv.mkDerivation rec { 28 pname = "geoclue"; 29 + version = "2.5.7"; 30 + 31 + outputs = [ "out" "dev" "devdoc" ]; 32 33 src = fetchFromGitLab { 34 domain = "gitlab.freedesktop.org"; 35 owner = pname; 36 repo = pname; 37 rev = version; 38 + sha256 = "1mv1vs4q94bqkmgkj53jcsw1x31kczwydyy3r27a7fycgzmii1pj"; 39 }; 40 41 patches = [ 42 + # Make the Mozilla API key configurable 43 + # https://gitlab.freedesktop.org/geoclue/geoclue/merge_requests/54 (only partially backported) 44 + (fetchpatch { 45 + url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/95c9ad4dc176860c85a07d0db4cb4179929bdb54.patch"; 46 + sha256 = "/lq/dLBJl2vf16tt7emYoTtXY6iUw+4s2XcABUHp3Kc="; 47 + }) 48 + (fetchpatch { 49 + url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/1a00809a0d89b0849a57647c878d192354247a33.patch"; 50 + sha256 = "6FuiukgFWg2cEKt8LlKP4E0rfSH/ZQgk6Ip1mGJpNFQ="; 51 + }) 52 + 53 ./add-option-for-installation-sysconfdir.patch 54 ]; 55 56 nativeBuildInputs = [ 57 + pkg-config 58 + intltool 59 + meson 60 + ninja 61 + wrapGAppsHook 62 + python3 63 + vala 64 + gobject-introspection 65 # devdoc 66 + gtk-doc 67 + docbook-xsl-nons 68 + docbook_xml_dtd_412 69 ]; 70 71 buildInputs = [ 72 + glib 73 + json-glib 74 + libsoup 75 + avahi 76 + ] ++ lib.optionals withDemoAgent [ 77 libnotify gdk-pixbuf 78 + ] ++ lib.optionals (!stdenv.isDarwin) [ 79 + modemmanager 80 + ]; 81 82 + propagatedBuildInputs = [ 83 + glib 84 + glib-networking 85 + ]; 86 87 mesonFlags = [ 88 "-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system" 89 + "-Ddemo-agent=${lib.boolToString withDemoAgent}" 90 "--sysconfdir=/etc" 91 "-Dsysconfdir_install=${placeholder "out"}/etc" 92 + "-Dmozilla-api-key=5c28d1f4-9511-47ff-b11a-2bef80fc177c" 93 "-Ddbus-srv-user=geoclue" 94 "-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d" 95 + ] ++ lib.optionals stdenv.isDarwin [ 96 "-D3g-source=false" 97 "-Dcdma-source=false" 98 "-Dmodem-gps-source=false"