mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
gsignond: init at 2018-10-04
This commit is contained in:
parent
32bcd72bf2
commit
1917c7de87
12
pkgs/development/libraries/gsignond/conf.patch
Normal file
12
pkgs/development/libraries/gsignond/conf.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index cb1e0df..d90c85c 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -95,6 +95,6 @@ endif
|
||||
configure_file(
|
||||
input: 'gsignond.conf.in',
|
||||
configuration: conf_data,
|
||||
- install_dir: sysconf_dir,
|
||||
+ install_dir: 'etc/',
|
||||
output: 'gsignond.conf'
|
||||
)
|
69
pkgs/development/libraries/gsignond/default.nix
Normal file
69
pkgs/development/libraries/gsignond/default.nix
Normal file
@ -0,0 +1,69 @@
|
||||
{ stdenv, fetchFromGitLab, pkgconfig, meson, ninja, glib, glib-networking
|
||||
, sqlite, gobjectIntrospection, vala, gtk-doc, libsecret, docbook_xsl
|
||||
, docbook_xml_dtd_43, docbook_xml_dtd_45, glibcLocales, makeWrapper
|
||||
, symlinkJoin, gsignondPlugins, plugins }:
|
||||
|
||||
let
|
||||
unwrapped = stdenv.mkDerivation rec {
|
||||
pname = "gsignond";
|
||||
version = "39022c86ddb5062a10fb0503ad9d81a8e532d527";
|
||||
|
||||
name = "${pname}-2018-10-04";
|
||||
|
||||
outputs = [ "out" "dev" "devdoc" ];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "accounts-sso";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1gw8vbj3j6wxqy759z97arm8lnqhmraw9s2frv3ar6crnfhlidff";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
docbook_xml_dtd_43
|
||||
docbook_xml_dtd_45
|
||||
docbook_xsl
|
||||
glibcLocales
|
||||
gobjectIntrospection
|
||||
gtk-doc
|
||||
meson
|
||||
ninja
|
||||
pkgconfig
|
||||
vala
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
glib-networking
|
||||
libsecret
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ sqlite ];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dbus_type=session"
|
||||
"-Dextension=desktop"
|
||||
];
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
||||
patches = [
|
||||
./conf.patch
|
||||
./plugin-load-env.patch
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "D-Bus service which performs user authentication on behalf of its clients";
|
||||
homepage = https://gitlab.com/accounts-sso/gsignond;
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ worldofpeace ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
|
||||
in if plugins == [] then unwrapped
|
||||
else import ./wrapper.nix {
|
||||
inherit stdenv makeWrapper symlinkJoin gsignondPlugins plugins;
|
||||
gsignond = unwrapped;
|
||||
}
|
||||
|
35
pkgs/development/libraries/gsignond/plugin-load-env.patch
Normal file
35
pkgs/development/libraries/gsignond/plugin-load-env.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff --git a/src/gplugind/gsignond-plugin-loader.c b/src/gplugind/gsignond-plugin-loader.c
|
||||
index 5497b32..979e1b4 100644
|
||||
--- a/src/gplugind/gsignond-plugin-loader.c
|
||||
+++ b/src/gplugind/gsignond-plugin-loader.c
|
||||
@@ -38,11 +38,10 @@ gsignond_load_plugin (
|
||||
gchar *plugin_filename;
|
||||
GSignondPlugin *plugin;
|
||||
|
||||
-# ifdef ENABLE_DEBUG
|
||||
const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR");
|
||||
if (env_val)
|
||||
plugin_path = env_val;
|
||||
-# endif
|
||||
+
|
||||
plugin_filename = g_module_build_path (plugin_path, plugin_type);
|
||||
plugin = gsignond_load_plugin_with_filename (plugin_type,
|
||||
plugin_filename);
|
||||
diff --git a/src/gplugind/main.c b/src/gplugind/main.c
|
||||
index 1c6cdb6..c85c623 100644
|
||||
--- a/src/gplugind/main.c
|
||||
+++ b/src/gplugind/main.c
|
||||
@@ -93,11 +93,11 @@ _install_sighandlers (GMainLoop *main_loop)
|
||||
static const gchar* _plugin_path(void)
|
||||
{
|
||||
const gchar *plugin_path = GSIGNOND_GPLUGINS_DIR;
|
||||
-# ifdef ENABLE_DEBUG
|
||||
+
|
||||
const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR");
|
||||
if (env_val)
|
||||
plugin_path = env_val;
|
||||
-# endif
|
||||
+
|
||||
return plugin_path;
|
||||
}
|
||||
|
23
pkgs/development/libraries/gsignond/wrapper.nix
Normal file
23
pkgs/development/libraries/gsignond/wrapper.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ stdenv, makeWrapper, symlinkJoin, gsignond, gsignondPlugins, plugins }:
|
||||
|
||||
symlinkJoin {
|
||||
name = "gsignond-with-plugins-${gsignond.version}";
|
||||
|
||||
paths = [ gsignond ] ++ plugins;
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/gsignond \
|
||||
--set SSO_GPLUGINS_DIR "$out/lib/gsignond/gplugins"
|
||||
|
||||
rm $out/share/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service
|
||||
rm $out/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service
|
||||
|
||||
substitute ${gsignond}/share/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service $out/share/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service \
|
||||
--replace ${gsignond} $out
|
||||
|
||||
substitute ${gsignond}/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service $out/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service \
|
||||
--replace ${gsignond} $out
|
||||
'';
|
||||
}
|
@ -12766,6 +12766,10 @@ with pkgs;
|
||||
|
||||
zziplib = callPackage ../development/libraries/zziplib { };
|
||||
|
||||
gsignond = callPackage ../development/libraries/gsignond {
|
||||
plugins = [];
|
||||
};
|
||||
|
||||
### DEVELOPMENT / LIBRARIES / AGDA
|
||||
|
||||
agda = callPackage ../build-support/agda {
|
||||
|
Loading…
Reference in New Issue
Block a user