<commit_before>{ stdenv, fetchurl, cmake, ccid, qttools, qttranslations, pkgconfig, pcsclite
, hicolor_icon_theme, libdigidocpp, opensc, shared_mime_info, openldap
, gettext, desktop_file_utils, makeWrapper }:

stdenv.mkDerivation rec {

  version = "3.12.0.1442";
  name = "qdigidoc-${version}";

  src = fetchurl {
    url = "https://installer.id.ee/media/ubuntu/pool/main/q/qdigidoc/qdigidoc_3.12.0.1442.orig.tar.xz";
    sha256 = "1a7nsi28q57ic99hrb6x83qlvpqvzvk6acbfl6ncny2j4yaxa4jl";
  };

  patches = [ ./certs.patch ./glibc-2_26.patch ];

  unpackPhase = ''
    mkdir src
    tar xf $src -C src
    cd src
  '';

  postInstall = ''
    wrapProgram $out/bin/qdigidocclient \
      --prefix LD_LIBRARY_PATH : ${opensc}/lib/pkcs11/
  '';

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ cmake ccid qttools pcsclite qttranslations
                  hicolor_icon_theme libdigidocpp opensc shared_mime_info
                  openldap gettext desktop_file_utils makeWrapper
                ];

  meta = with stdenv.lib; {<commit_msg>qdigidoc: enable parallel building<commit_after>{ stdenv, fetchurl, cmake, ccid, qttools, qttranslations, pkgconfig, pcsclite
, hicolor_icon_theme, libdigidocpp, opensc, shared_mime_info, openldap
, gettext, desktop_file_utils, makeWrapper }:

stdenv.mkDerivation rec {

  version = "3.12.0.1442";
  name = "qdigidoc-${version}";

  src = fetchurl {
    url = "https://installer.id.ee/media/ubuntu/pool/main/q/qdigidoc/qdigidoc_3.12.0.1442.orig.tar.xz";
    sha256 = "1a7nsi28q57ic99hrb6x83qlvpqvzvk6acbfl6ncny2j4yaxa4jl";
  };

  patches = [ ./certs.patch ./glibc-2_26.patch ];

  unpackPhase = ''
    mkdir src
    tar xf $src -C src
    cd src
  '';

  postInstall = ''
    wrapProgram $out/bin/qdigidocclient \
      --prefix LD_LIBRARY_PATH : ${opensc}/lib/pkcs11/
  '';

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ cmake ccid qttools pcsclite qttranslations
                  hicolor_icon_theme libdigidocpp opensc shared_mime_info
                  openldap gettext desktop_file_utils makeWrapper
                ];

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
{'fraction_non_alphanumeric': 0.11183902667290595, 'fraction_numerical': 0.03743565746373421, 'mean_word_length': 3.2086614173228347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '5513189', 'n_tokens_mistral': 884, 'n_tokens_neox': 814, 'n_words': 139}