git.iko.soy/typeable/nixpkgs
on master help sign in
gsignond: init at 2018-10-04
commit1917c7de875bcf9a13c50c40d16671c886940d6c authorworldofpeace <worldofpeace@users.noreply.github.com> dateSat 7 Jul 2018, 08:49 (8 years ago) parent32bcd72
5 files changed+143
pkgs/development/libraries/gsignond/conf.patch+12 pkgs/development/libraries/gsignond/default.nix+69 pkgs/development/libraries/gsignond/plugin-load-env.patch+35 pkgs/development/libraries/gsignond/wrapper.nix+23 pkgs/top-level/all-packages.nix+4
pkgs/development/libraries/gsignond/conf.patchnew file+12
@@ -0,0 +1,12 @@
1+diff --git a/meson.build b/meson.build
2+index cb1e0df..d90c85c 100644
3+--- a/meson.build
4++++ b/meson.build
5+@@ -95,6 +95,6 @@ endif
6+ configure_file(
7+ input: 'gsignond.conf.in',
8+ configuration: conf_data,
9+- install_dir: sysconf_dir,
10++ install_dir: 'etc/',
11+ output: 'gsignond.conf'
12+ )
pkgs/development/libraries/gsignond/default.nixnew file+69
@@ -0,0 +1,69 @@
1+{ stdenv, fetchFromGitLab, pkgconfig, meson, ninja, glib, glib-networking
2+, sqlite, gobjectIntrospection, vala, gtk-doc, libsecret, docbook_xsl
3+, docbook_xml_dtd_43, docbook_xml_dtd_45, glibcLocales, makeWrapper
4+, symlinkJoin, gsignondPlugins, plugins }:
5+
6+let
7+unwrapped = stdenv.mkDerivation rec {
8+ pname = "gsignond";
9+ version = "39022c86ddb5062a10fb0503ad9d81a8e532d527";
10+
11+ name = "${pname}-2018-10-04";
12+
13+ outputs = [ "out" "dev" "devdoc" ];
14+
15+ src = fetchFromGitLab {
16+ owner = "accounts-sso";
17+ repo = pname;
18+ rev = version;
19+ sha256 = "1gw8vbj3j6wxqy759z97arm8lnqhmraw9s2frv3ar6crnfhlidff";
20+ };
21+
22+ nativeBuildInputs = [
23+ docbook_xml_dtd_43
24+ docbook_xml_dtd_45
25+ docbook_xsl
26+ glibcLocales
27+ gobjectIntrospection
28+ gtk-doc
29+ meson
30+ ninja
31+ pkgconfig
32+ vala
33+ ];
34+
35+ buildInputs = [
36+ glib
37+ glib-networking
38+ libsecret
39+ ];
40+
41+ propagatedBuildInputs = [ sqlite ];
42+
43+ mesonFlags = [
44+ "-Dbus_type=session"
45+ "-Dextension=desktop"
46+ ];
47+
48+ LC_ALL = "en_US.UTF-8";
49+
50+ patches = [
51+ ./conf.patch
52+ ./plugin-load-env.patch
53+ ];
54+
55+ meta = with stdenv.lib; {
56+ description = "D-Bus service which performs user authentication on behalf of its clients";
57+ homepage = https://gitlab.com/accounts-sso/gsignond;
58+ license = licenses.lgpl21Plus;
59+ maintainers = with maintainers; [ worldofpeace ];
60+ platforms = platforms.linux;
61+ };
62+};
63+
64+in if plugins == [] then unwrapped
65+ else import ./wrapper.nix {
66+ inherit stdenv makeWrapper symlinkJoin gsignondPlugins plugins;
67+ gsignond = unwrapped;
68+ }
69+
pkgs/development/libraries/gsignond/plugin-load-env.patchnew file+35
@@ -0,0 +1,35 @@
1+diff --git a/src/gplugind/gsignond-plugin-loader.c b/src/gplugind/gsignond-plugin-loader.c
2+index 5497b32..979e1b4 100644
3+--- a/src/gplugind/gsignond-plugin-loader.c
4++++ b/src/gplugind/gsignond-plugin-loader.c
5+@@ -38,11 +38,10 @@ gsignond_load_plugin (
6+ gchar *plugin_filename;
7+ GSignondPlugin *plugin;
8+
9+-# ifdef ENABLE_DEBUG
10+ const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR");
11+ if (env_val)
12+ plugin_path = env_val;
13+-# endif
14++
15+ plugin_filename = g_module_build_path (plugin_path, plugin_type);
16+ plugin = gsignond_load_plugin_with_filename (plugin_type,
17+ plugin_filename);
18+diff --git a/src/gplugind/main.c b/src/gplugind/main.c
19+index 1c6cdb6..c85c623 100644
20+--- a/src/gplugind/main.c
21++++ b/src/gplugind/main.c
22+@@ -93,11 +93,11 @@ _install_sighandlers (GMainLoop *main_loop)
23+ static const gchar* _plugin_path(void)
24+ {
25+ const gchar *plugin_path = GSIGNOND_GPLUGINS_DIR;
26+-# ifdef ENABLE_DEBUG
27++
28+ const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR");
29+ if (env_val)
30+ plugin_path = env_val;
31+-# endif
32++
33+ return plugin_path;
34+ }
35+
pkgs/development/libraries/gsignond/wrapper.nixnew file+23
@@ -0,0 +1,23 @@
1+{ stdenv, makeWrapper, symlinkJoin, gsignond, gsignondPlugins, plugins }:
2+
3+symlinkJoin {
4+ name = "gsignond-with-plugins-${gsignond.version}";
5+
6+ paths = [ gsignond ] ++ plugins;
7+
8+ buildInputs = [ makeWrapper ];
9+
10+ postBuild = ''
11+ wrapProgram $out/bin/gsignond \
12+ --set SSO_GPLUGINS_DIR "$out/lib/gsignond/gplugins"
13+
14+ rm $out/share/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service
15+ rm $out/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service
16+
17+ substitute ${gsignond}/share/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service $out/share/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service \
18+ --replace ${gsignond} $out
19+
20+ substitute ${gsignond}/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service $out/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service \
21+ --replace ${gsignond} $out
22+ '';
23+}
pkgs/top-level/all-packages.nix+4
@@ -12766,6 +12766,10 @@ with pkgs;
1276612766
1276712767 zziplib = callPackage ../development/libraries/zziplib { };
1276812768
12769+ gsignond = callPackage ../development/libraries/gsignond {
12770+ plugins = [];
12771+ };
12772+
1276912773 ### DEVELOPMENT / LIBRARIES / AGDA
1277012774
1277112775 agda = callPackage ../build-support/agda {