<commit_before>{ stdenv, fetchFromGitHub, cmake, makeWrapper, qttools

, curl
, libargon2
, libgcrypt
, libsodium
, zlib
, libmicrohttpd
, libXtst
, qtbase
, libgpgerror
, glibcLocales
, libyubikey
, yubikey-personalization
, libXi
, qtx11extras

, withKeePassBrowser ? true
, withKeePassSSHAgent ? true
, withKeePassHTTP ? false
, withKeePassNetworking ? false
}:

with stdenv.lib;

stdenv.mkDerivation rec {
  name = "keepassxc-${version}";
  version = "2.3.0";

  src = fetchFromGitHub {
    owner = "keepassxreboot";
    repo = "keepassxc";
    rev = "${version}";
    sha256 = "1zch1qbqgphhp2p2kvjlah8s337162m69yf4y00kcnfb3539ii5f";
  };

  patches = [ ./darwin.patch ];

  cmakeFlags = [
    "-DKEEPASSXC_BUILD_TYPE=Release"
    "-DWITH_GUI_TESTS=ON"
    "-DWITH_XC_AUTOTYPE=ON"
    "-DWITH_XC_YUBIKEY=ON"
  ]<commit_msg>keepassxc: hopefully fix darwin<commit_after>{ stdenv, fetchFromGitHub, cmake, makeWrapper, qttools

, curl
, libargon2
, libgcrypt
, libsodium
, zlib
, libmicrohttpd
, libXtst
, qtbase
, libgpgerror
, glibcLocales
, libyubikey
, yubikey-personalization
, libXi
, qtx11extras

, withKeePassBrowser ? true
, withKeePassSSHAgent ? true
, withKeePassHTTP ? false
, withKeePassNetworking ? false
}:

with stdenv.lib;

stdenv.mkDerivation rec {
  name = "keepassxc-${version}";
  version = "2.3.0";

  src = fetchFromGitHub {
    owner = "keepassxreboot";
    repo = "keepassxc";
    rev = "${version}";
    sha256 = "1zch1qbqgphhp2p2kvjlah8s337162m69yf4y00kcnfb3539ii5f";
  };

  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-old-style-cast";

  patches = [ ./darwin.patch ];

  cmakeFlags = [
    "-DKEEPASSXC_BUILD_TYPE=Release"
    "-DWITH_GUI_TESTS=ON"
    "-DWITH_XC_AUTOTYPE=ON"
    "-DWITH_XC_YUBIKEY=ON"
  ]
{'fraction_non_alphanumeric': 0.12081678956324447, 'fraction_numerical': 0.03403289846851957, 'mean_word_length': 4.281437125748503, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1360714', 'n_tokens_mistral': 801, 'n_tokens_neox': 757, 'n_words': 113}