summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@users.noreply.github.com>2018-12-25 19:03:22 -0500
committerGitHub <noreply@github.com>2018-12-25 19:03:22 -0500
commit3f6c81da4d3dad5c74a7d8dfdb9a62f87b9cd182 (patch)
tree4e4e32915fd410190c69c72d5e0ef9087dda6d71 /pkgs/development
parent2130e97de3a08f26b189ec1361903bd2630cb19f (diff)
parentc65edd687f11a5b16b79bc90b129ccdf9b8bc902 (diff)
downloadnixpkgs-3f6c81da4d3dad5c74a7d8dfdb9a62f87b9cd182.tar
nixpkgs-3f6c81da4d3dad5c74a7d8dfdb9a62f87b9cd182.tar.gz
nixpkgs-3f6c81da4d3dad5c74a7d8dfdb9a62f87b9cd182.tar.bz2
nixpkgs-3f6c81da4d3dad5c74a7d8dfdb9a62f87b9cd182.tar.lz
nixpkgs-3f6c81da4d3dad5c74a7d8dfdb9a62f87b9cd182.tar.xz
nixpkgs-3f6c81da4d3dad5c74a7d8dfdb9a62f87b9cd182.tar.zst
nixpkgs-3f6c81da4d3dad5c74a7d8dfdb9a62f87b9cd182.zip
Merge pull request #52592 from worldofpeace/geoclue/correct-sysconf
geoclue2: correct sysconfdir
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch55
-rw-r--r--pkgs/development/libraries/geoclue/default.nix6
2 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch b/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch
new file mode 100644
index 00000000000..629ea102971
--- /dev/null
+++ b/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch
@@ -0,0 +1,55 @@
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -7,7 +7,7 @@
+         conf.set('demo_agent', '')
+     endif
+ 
+-    conf_dir = join_paths(get_option('sysconfdir'), 'geoclue')
++    conf_dir = join_paths(sysconfdir_install, 'geoclue')
+     configure_file(output: 'geoclue.conf',
+                    input: 'geoclue.conf.in',
+                    configuration: conf,
+@@ -26,7 +26,7 @@
+     # DBus Service policy file
+     dbus_service_dir = get_option('dbus-sys-dir')
+     if dbus_service_dir  == ''
+-        dbus_service_dir = join_paths(get_option('sysconfdir'), 'dbus-1', 'system.d')
++        dbus_service_dir = join_paths(sysconfdir_install, 'dbus-1', 'system.d')
+     endif
+     configure_file(output: 'org.freedesktop.GeoClue2.conf',
+                    input: 'org.freedesktop.GeoClue2.conf.in',
+--- a/demo/meson.build
++++ b/demo/meson.build
+@@ -56,8 +56,7 @@
+                                    install_dir: desktop_dir)
+ 
+     # Also install in the autostart directory.
+-    autostart_dir = join_paths(get_option('prefix'),
+-                               get_option('sysconfdir'),
++    autostart_dir = join_paths(sysconfdir_install,
+                                'xdg', 'autostart')
+     meson.add_install_script('install-file.py',
+                              desktop_file.full_path(),
+--- a/meson.build
++++ b/meson.build
+@@ -22,6 +22,11 @@
+ datadir = join_paths(get_option('prefix'), get_option('datadir'))
+ conf.set_quoted('LOCALEDIR', datadir + '/locale')
+ conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
++if get_option('sysconfdir_install') != ''
++  sysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install'))
++else
++  sysconfdir_install = get_option('sysconfdir')
++endif
+ 
+ configure_file(output: 'config.h', configuration : conf)
+ configinc = include_directories('.')
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -34,3 +34,6 @@
+ option('dbus-srv-user',
+        type: 'string', value: 'root',
+        description: 'The user (existing) as which the service will run')
++option('sysconfdir_install',
++       type: 'string', value: '',
++       description: 'sysconfdir to use during installation')
diff --git a/pkgs/development/libraries/geoclue/default.nix b/pkgs/development/libraries/geoclue/default.nix
index f2eeb9ae40b..5e83ba71c1b 100644
--- a/pkgs/development/libraries/geoclue/default.nix
+++ b/pkgs/development/libraries/geoclue/default.nix
@@ -17,6 +17,10 @@ stdenv.mkDerivation rec {
     sha256 = "0vww6irijw5ss7vawkdi5z5wdpcgw4iqljn5vs3vbd4y3d0lzrbs";
   };
 
+  patches = [
+    ./add-option-for-installation-sysconfdir.patch
+  ];
+
   outputs = [ "out" "dev" "devdoc" ];
 
   nativeBuildInputs = [
@@ -36,6 +40,8 @@ stdenv.mkDerivation rec {
   mesonFlags = [
     "-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
     "-Ddemo-agent=${if withDemoAgent then "true" else "false"}"
+    "--sysconfdir=/etc"
+    "-Dsysconfdir_install=${placeholder "out"}/etc"
   ] ++ optionals stdenv.isDarwin [
     "-D3g-source=false"
     "-Dcdma-source=false"