diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/libaccounts-glib | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libaccounts-glib')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix | 52 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libaccounts-glib/py-override.patch | 38 |
2 files changed, 90 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix b/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix new file mode 100644 index 000000000000..525ec6e35f60 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix @@ -0,0 +1,52 @@ +{ stdenv, fetchFromGitLab, meson, ninja, glib, check, python3, vala, gtk-doc, glibcLocales +, libxml2, libxslt, pkgconfig, sqlite, docbook_xsl, docbook_xml_dtd_43, gobject-introspection }: + +stdenv.mkDerivation rec { + name = "libaccounts-glib-${version}"; + version = "1.24"; + + outputs = [ "out" "dev" "devdoc" "py" ]; + + src = fetchFromGitLab { + owner = "accounts-sso"; + repo = "libaccounts-glib"; + rev = version; + sha256 = "0y8smg1rd279lrr9ad8b499i8pbkajmwd4xn41rdh9h93hs9apn7"; + }; + + # See: https://gitlab.com/accounts-sso/libaccounts-glib/merge_requests/22 + patches = [ ./py-override.patch ]; + + nativeBuildInputs = [ + check + docbook_xml_dtd_43 + docbook_xsl + glibcLocales + gobject-introspection + gtk-doc + meson + ninja + pkgconfig + vala + ]; + + buildInputs = [ + glib + libxml2 + libxslt + python3.pkgs.pygobject3 + sqlite + ]; + + LC_ALL = "en_US.UTF-8"; + + 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"; + platforms = platforms.linux; + license = licenses.lgpl21; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/libaccounts-glib/py-override.patch b/nixpkgs/pkgs/development/libraries/libaccounts-glib/py-override.patch new file mode 100644 index 000000000000..4179f4fa0af0 --- /dev/null +++ b/nixpkgs/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') |