2021-03-26 20:04:58 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, dbus
|
|
|
|
, libgcrypt
|
|
|
|
, pam
|
2022-03-26 19:08:50 +00:00
|
|
|
, python3
|
2021-03-26 20:04:58 +00:00
|
|
|
, glib
|
|
|
|
, libxslt
|
|
|
|
, gettext
|
|
|
|
, gcr
|
|
|
|
, libcap_ng
|
|
|
|
, libselinux
|
|
|
|
, p11-kit
|
|
|
|
, openssh
|
2024-04-26 20:24:03 +00:00
|
|
|
, wrapGAppsHook3
|
2021-03-26 20:04:58 +00:00
|
|
|
, docbook-xsl-nons
|
|
|
|
, docbook_xml_dtd_43
|
2021-05-07 21:18:14 +00:00
|
|
|
, gnome
|
2023-02-24 04:13:46 +00:00
|
|
|
, useWrappedDaemon ? true
|
2021-03-26 20:04:58 +00:00
|
|
|
}:
|
2016-09-18 19:35:23 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gnome-keyring";
|
2024-07-16 14:11:51 +00:00
|
|
|
version = "46.2";
|
2021-03-26 20:04:58 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
2018-02-25 20:07:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-03-26 20:04:58 +00:00
|
|
|
url = "mirror://gnome/sources/gnome-keyring/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
2024-07-16 14:11:51 +00:00
|
|
|
hash = "sha256-vybJZriot/MoXsyLs+RnucIPlTW5TcRRycVZ3c/2GSU=";
|
2018-02-25 20:07:20 +00:00
|
|
|
};
|
|
|
|
|
2021-03-26 20:04:58 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
gettext
|
|
|
|
libxslt
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_43
|
2024-04-26 20:24:03 +00:00
|
|
|
wrapGAppsHook3
|
2021-02-01 12:04:18 +00:00
|
|
|
];
|
|
|
|
|
2018-08-09 23:04:52 +00:00
|
|
|
buildInputs = [
|
2021-03-26 20:04:58 +00:00
|
|
|
glib
|
|
|
|
libgcrypt
|
|
|
|
pam
|
|
|
|
openssh
|
|
|
|
libcap_ng
|
|
|
|
libselinux
|
|
|
|
gcr
|
|
|
|
p11-kit
|
2016-09-18 19:35:23 +00:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ dbus python3 ];
|
2016-09-18 19:35:23 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
2019-09-03 16:38:57 +00:00
|
|
|
"--with-pkcs11-config=${placeholder "out"}/etc/pkcs11/" # installation directories
|
|
|
|
"--with-pkcs11-modules=${placeholder "out"}/lib/pkcs11/"
|
2024-03-03 00:13:43 +00:00
|
|
|
# gnome-keyring doesn't build with ssh-agent by default anymore, we need to
|
|
|
|
# switch to using gcr https://github.com/NixOS/nixpkgs/issues/140824
|
|
|
|
"--enable-ssh-agent"
|
2024-05-13 17:27:30 +00:00
|
|
|
# cross compilation requires these paths to be explicitly declared:
|
|
|
|
"LIBGCRYPT_CONFIG=${lib.getExe' (lib.getDev libgcrypt) "libgcrypt-config"}"
|
|
|
|
"SSH_ADD=${lib.getExe' openssh "ssh-add"}"
|
|
|
|
"SSH_AGENT=${lib.getExe' openssh "ssh-agent"}"
|
2016-09-18 19:35:23 +00:00
|
|
|
];
|
|
|
|
|
2019-02-06 22:55:12 +00:00
|
|
|
# Tends to fail non-deterministically.
|
|
|
|
# - https://github.com/NixOS/nixpkgs/issues/55293
|
|
|
|
# - https://github.com/NixOS/nixpkgs/issues/51121
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-03-26 20:04:58 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build
|
|
|
|
'';
|
2018-08-08 18:25:45 +00:00
|
|
|
|
2017-12-18 18:42:32 +00:00
|
|
|
checkPhase = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
dbus-run-session \
|
2022-11-21 02:03:50 +00:00
|
|
|
--config-file=${dbus}/share/dbus-1/session.conf \
|
2017-12-18 18:42:32 +00:00
|
|
|
make check
|
|
|
|
'';
|
|
|
|
|
2019-04-15 18:54:03 +00:00
|
|
|
# Use wrapped gnome-keyring-daemon with cap_ipc_lock=ep
|
2023-02-24 04:13:46 +00:00
|
|
|
postFixup = lib.optionalString useWrappedDaemon ''
|
2019-04-15 18:54:03 +00:00
|
|
|
files=($out/etc/xdg/autostart/* $out/share/dbus-1/services/*)
|
|
|
|
|
|
|
|
for file in ''${files[*]}; do
|
|
|
|
substituteInPlace $file \
|
|
|
|
--replace "$out/bin/gnome-keyring-daemon" "/run/wrappers/bin/gnome-keyring-daemon"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2018-08-09 23:04:52 +00:00
|
|
|
passthru = {
|
2021-05-07 21:18:14 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2018-08-09 23:04:52 +00:00
|
|
|
packageName = "gnome-keyring";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-12-18 18:42:32 +00:00
|
|
|
description = "Collection of components in GNOME that store secrets, passwords, keys, certificates and make them available to applications";
|
2024-04-30 14:14:16 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/gnome-keyring";
|
2017-12-18 18:42:32 +00:00
|
|
|
license = licenses.gpl2;
|
2020-04-01 12:40:51 +00:00
|
|
|
maintainers = teams.gnome.members;
|
2017-12-18 18:42:32 +00:00
|
|
|
platforms = platforms.linux;
|
2016-09-18 19:35:23 +00:00
|
|
|
};
|
|
|
|
}
|