14 , gobject-introspection
16 , withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
25 stdenv.mkDerivation rec {
29 outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
32 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
33 sha256 = "P7PONA/NfbVNh8iT5pv8Kx9uTUsnkGX/5m2snw/RK00=";
45 libxslt # for xsltproc for building man pages
51 ] ++ lib.optionals withIntrospection [
60 propagatedBuildInputs = [
66 python3.pkgs.dbus-python
67 python3.pkgs.pygobject3
73 (lib.mesonBool "introspection" withIntrospection)
74 (lib.mesonBool "gtk_doc" withIntrospection)
77 doCheck = stdenv.isLinux && withIntrospection;
78 separateDebugInfo = true;
81 patchShebangs ./tool/test-*.sh
85 # Our gobject-introspection patches make the shared library paths absolute
86 # in the GIR files. When running tests, the library is not yet installed,
87 # though, so we need to replace the absolute path with a local one during build.
88 # We are using a symlink that will be overwitten during installation.
89 mkdir -p $out/lib $out/lib
90 ln -s "$PWD/libsecret/libmock-service.so" "$out/lib/libmock-service.so"
91 ln -s "$PWD/libsecret/libsecret-1.so.0" "$out/lib/libsecret-1.so.0"
98 --config-file=${dbus}/share/dbus-1/session.conf \
99 meson test --print-errorlogs --timeout-multiplier 0
105 # This is test-only so it won’t be overwritten during installation.
106 rm "$out/lib/libmock-service.so"
110 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
111 moveToOutput "share/doc" "$devdoc"
115 updateScript = gnome.updateScript {
117 # Does not seem to use the odd-unstable policy: https://gitlab.gnome.org/GNOME/libsecret/issues/30
118 versionPolicy = "none";
123 description = "A library for storing and retrieving passwords and other secrets";
124 homepage = "https://wiki.gnome.org/Projects/Libsecret";
125 license = lib.licenses.lgpl21Plus;
126 mainProgram = "secret-tool";
127 inherit (glib.meta) platforms maintainers;