summary refs log tree commit diff
path: root/pkgs/development/libraries/libaccounts-glib
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@users.noreply.github.com>2018-11-07 17:05:19 -0500
committerworldofpeace <worldofpeace@users.noreply.github.com>2018-11-07 17:05:19 -0500
commit913a6510ed3a2a5772403d1301a830e431985e7b (patch)
tree79975ceb3b8df3da6f20b5288938cacbebbc3de5 /pkgs/development/libraries/libaccounts-glib
parent179b8146e668636fe59ef7663a6c8cd15d00db7e (diff)
downloadnixpkgs-913a6510ed3a2a5772403d1301a830e431985e7b.tar
nixpkgs-913a6510ed3a2a5772403d1301a830e431985e7b.tar.gz
nixpkgs-913a6510ed3a2a5772403d1301a830e431985e7b.tar.bz2
nixpkgs-913a6510ed3a2a5772403d1301a830e431985e7b.tar.lz
nixpkgs-913a6510ed3a2a5772403d1301a830e431985e7b.tar.xz
nixpkgs-913a6510ed3a2a5772403d1301a830e431985e7b.tar.zst
nixpkgs-913a6510ed3a2a5772403d1301a830e431985e7b.zip
libaccounts-glib: 1.23 -> 1.24
- Switched to the Meson Build System
Diffstat (limited to 'pkgs/development/libraries/libaccounts-glib')
-rw-r--r--pkgs/development/libraries/libaccounts-glib/default.nix49
-rw-r--r--pkgs/development/libraries/libaccounts-glib/py-override.patch38
2 files changed, 72 insertions, 15 deletions
diff --git a/pkgs/development/libraries/libaccounts-glib/default.nix b/pkgs/development/libraries/libaccounts-glib/default.nix
index 16e9f213ed4..e8e23ed5ffb 100644
--- a/pkgs/development/libraries/libaccounts-glib/default.nix
+++ b/pkgs/development/libraries/libaccounts-glib/default.nix
@@ -1,29 +1,48 @@
-{ stdenv, fetchFromGitLab, autoconf, automake, glib
-, gtk-doc, libtool, libxml2, libxslt, pkgconfig, sqlite }:
+{ stdenv, fetchFromGitLab, meson, ninja, glib, check, python3, vala, gtk-doc, glibcLocales
+, libxml2, libxslt, pkgconfig, sqlite, docbook_xsl, docbook_xml_dtd_43, gobjectIntrospection }:
 
-let version = "1.23"; in
 stdenv.mkDerivation rec {
   name = "libaccounts-glib-${version}";
+  version = "1.24";
+
+  outputs = [ "out" "dev" "devdoc" "py" ];
 
   src = fetchFromGitLab {
-    sha256 = "11cvl3ch0y93756k90mw1swqv0ylr8qgalmvcn5yari8z4sg6cgg";
-    rev = "VERSION_${version}";
-    repo = "libaccounts-glib";
     owner = "accounts-sso";
+    repo = "libaccounts-glib";
+    rev = version;
+    sha256 = "0y8smg1rd279lrr9ad8b499i8pbkajmwd4xn41rdh9h93hs9apn7";
   };
 
-  buildInputs = [ glib libxml2 libxslt sqlite ];
-  nativeBuildInputs = [ autoconf automake gtk-doc libtool pkgconfig ];
+  # See: https://gitlab.com/accounts-sso/libaccounts-glib/merge_requests/22
+  patches = [ ./py-override.patch ];
+
+  nativeBuildInputs = [ 
+    check
+    docbook_xml_dtd_43
+    docbook_xsl
+    glibcLocales
+    gobjectIntrospection
+    gtk-doc
+    meson
+    ninja
+    pkgconfig
+    vala
+  ];
 
-  postPatch = ''
-    NOCONFIGURE=1 ./autogen.sh
-  '';
+  buildInputs = [
+    glib
+    libxml2
+    libxslt
+    python3.pkgs.pygobject3
+    sqlite
+  ];
 
-  configurePhase = ''
-    HAVE_GCOV_FALSE="#" ./configure $configureFlags --prefix=$out
-  '';
+  LC_ALL = "en_US.UTF-8";
 
-  NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; # since glib-2.46
+  mesonFlags = [
+    "-Dpy-overrides-dir=${placeholder ''py''}/${python3.sitePackages}/gi/overrides"
+  ];
 
   meta = with stdenv.lib; {
     description = "Library for managing accounts which can be used from GLib applications";
diff --git a/pkgs/development/libraries/libaccounts-glib/py-override.patch b/pkgs/development/libraries/libaccounts-glib/py-override.patch
new file mode 100644
index 00000000000..4179f4fa0af
--- /dev/null
+++ b/pkgs/development/libraries/libaccounts-glib/py-override.patch
@@ -0,0 +1,38 @@
+diff --git a/libaccounts-glib/pygobject/meson.build b/libaccounts-glib/pygobject/meson.build
+index fa1f4a0..588c4ce 100644
+--- a/libaccounts-glib/pygobject/meson.build
++++ b/libaccounts-glib/pygobject/meson.build
+@@ -1,11 +1,19 @@
+-python3 = import('python3')
+-python_exec = python3.find_python()
+-python_exec_result = run_command(python_exec, ['-c', 'import gi; from os.path import abspath; print(abspath(gi._overridesdir))'])
++py_override = get_option('py-overrides-dir')
+ 
+-if python_exec_result.returncode() != 0
+-    error('Failed to retreive the python GObject override directory')
++if py_override == ''
++    python3 = import('python3')
++    python_exec = python3.find_python()
++    
++    python_exec_result = run_command(python_exec, ['-c', 'import gi; from os.path import abspath; print(abspath(gi._overridesdir))'])
++
++    if python_exec_result.returncode() != 0
++        error('Failed to retreive the python GObject override directory')
++    endif
++
++    py_override = python_exec_result.stdout().strip()
+ endif
+ 
+-install_data('Accounts.py',
+-    install_dir: join_paths(python_exec_result.stdout().strip())
++install_data(
++    'Accounts.py',
++    install_dir: py_override
+ )
+diff --git a/meson_options.txt  b/meson_options.txt 
+new file mode 100644
+index 0000000..2c33804
+--- /dev/null
++++ b/meson_options.txt 	
+@@ -0,0 +1 @@
++option('py-overrides-dir', type : 'string', value : '', description: 'Path to pygobject overrides directory')