<commit_before>{ stdenv
, docbook-xsl
, fetchurl
, intltool
, libxslt

, glib
, gobject-introspection
, libgcrypt
, vala
}:

let
  inherit (stdenv.lib)
    enFlag
    wtFlag;

  versionMajor = "0.18";
  versionMinor = "5";
  version = "${versionMajor}.${versionMinor}";
in
stdenv.mkDerivation rec {
  name = "libsecret-${version}";

  src = fetchurl {
    url = "mirror://gnome/sources/libsecret/${versionMajor}/${name}.tar.xz";
    sha256 = "9ce7bd8dd5831f2786c935d82638ac428fa085057cc6780aba0e39375887ccb3";
  };

  nativeBuildInputs = [
    intltool
    libxslt
    docbook-xsl
  ];

  buildInputs = [
    glib
    gobject-introspection
    libgcrypt
    vala
  ];

  configureFlags = [
    "--disable-maintainer-mode"
    "--enable-nls"
    "--disable-gtk-doc"
    "--disable-gtk-doc-html"
    "--disable-gtk-doc-pdf"
    (enFlag "introspection" (gobject-introspection != null) null)
    "--enable-manpages"
    (enFlag "vala" (vala != null) null)
    (enFlag "gcrypt" (libgcrypt != null) null)
    "--disable-debug"
    "--disable-coverage"
    (wtFlag "libgcrypt-prefix" (libgcrypt != null) libgcrypt)
  ];

  meta = with stdenv.lib; {
    description = "GObject library for the freedesktop.org Secret Service API";
    homepage = https://wiki.gnome.org/Projects/Libsecret;
    license = with licenses; [
      #apache20
      lgpl21Plus
    ];
    maintainers = with maintainers; [
      codyopel<commit_msg>libsecret: refactor<commit_after>{ stdenv
, docbook-xsl
, fetchurl
, intltool
, lib
, libxslt

, glib
, gobject-introspection
, libgcrypt
, vala
}:

let
  inherit (lib)
    boolEn;

  versionMajor = "0.18";
  versionMinor = "5";
  version = "${versionMajor}.${versionMinor}";
in
stdenv.mkDerivation rec {
  name = "libsecret-${version}";

  src = fetchurl {
    url = "mirror://gnome/sources/libsecret/${versionMajor}/${name}.tar.xz";
    sha256 = "9ce7bd8dd5831f2786c935d82638ac428fa085057cc6780aba0e39375887ccb3";
  };

  nativeBuildInputs = [
    intltool
    libxslt
    docbook-xsl
  ];

  buildInputs = [
    glib
    gobject-introspection
    libgcrypt
    vala
  ];

  configureFlags = [
    "--disable-maintainer-mode"
    "--enable-nls"
    "--disable-gtk-doc"
    "--disable-gtk-doc-html"
    "--disable-gtk-doc-pdf"
    "--enable-introspection"
    "--enable-manpages"
    "--${boolEn (vala != null)}-vala"
    "--enable-gcrypt"
    "--disable-debug"
    "--disable-coverage"
    "--with-libgcrypt-prefix=${libgcrypt}"
  ];

  meta = with lib; {
    description = "GObject library for the freedesktop.org Secret Service API";
    homepage = https://wiki.gnome.org/Projects/Libsecret;
    license = with licenses; [
      #apache20
      lgpl21Plus
    ];
    maintainers = with maintainers; [
      codyopel
{'fraction_non_alphanumeric': 0.1441111923920995, 'fraction_numerical': 0.038771031455742504, 'mean_word_length': 2.8904694167852063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4653452', 'n_tokens_mistral': 1091, 'n_tokens_neox': 1003, 'n_words': 172}