<commit_before>{ stdenv, pass, fetchFromGitHub, pythonPackages, makeWrapper }:

let
  pythonEnv = pythonPackages.python.withPackages (p: [ p.defusedxml ]);

in stdenv.mkDerivation rec {
  name = "pass-import-${version}";
  version = "2.2";

  src = fetchFromGitHub {
    owner = "roddhjav";
    repo = "pass-import";
    rev = "v${version}";
    sha256 = "189wf2jz2j43k27930cnl53sm2drh1s0nq1nmh4is3rzn8cna6wq";
  };

  nativeBuildInputs = [ makeWrapper ];

  buildInputs = [ pythonEnv ];

  patchPhase = ''
    sed -i -e 's|$0|${pass}/bin/pass|' import.bash
  '';

  dontBuild = true;

  installFlags = [ "PREFIX=$(out)" ];

  postFixup = ''
    wrapProgram $out/lib/password-store/extensions/import.bash \
      --prefix PATH : "${pythonEnv}/bin" \
      --run "export PREFIX"
  '';

  meta = with stdenv.lib; {
    description = "Pass extension for importing data from existing password managers";
    homepage = https://github.com/roddhjav/pass-import;
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ lovek323 the-kenny fpletz tadfisher ];
    platforms = platforms.unix;<commit_msg>passExtensions.pass-import: 2.2 -> 2.3<commit_after>{ stdenv, pass, fetchFromGitHub, pythonPackages, makeWrapper }:

let
  pythonEnv = pythonPackages.python.withPackages (p: [ p.defusedxml ]);

in stdenv.mkDerivation rec {
  name = "pass-import-${version}";
  version = "2.3";

  src = fetchFromGitHub {
    owner = "roddhjav";
    repo = "pass-import";
    rev = "v${version}";
    sha256 = "1209aqkiqqbir5yzwk5jvyk8c1fyrsj9igr3n4banf347rlwmzfv";
  };

  nativeBuildInputs = [ makeWrapper ];

  buildInputs = [ pythonEnv ];

  patchPhase = ''
    sed -i -e 's|$0|${pass}/bin/pass|' import.bash
  '';

  dontBuild = true;

  installFlags = [ "PREFIX=$(out)" ];

  postFixup = ''
    wrapProgram $out/lib/password-store/extensions/import.bash \
      --prefix PATH : "${pythonEnv}/bin" \
      --run "export PREFIX"
  '';

  meta = with stdenv.lib; {
    description = "Pass extension for importing data from existing password managers";
    homepage = https://github.com/roddhjav/pass-import;
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ lovek323 the-kenny fpletz tadfisher ];
    platforms = platforms.unix;
{'fraction_non_alphanumeric': 0.14311190370040125, 'fraction_numerical': 0.026749888542131076, 'mean_word_length': 3.4435643564356435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '125937', 'n_tokens_mistral': 842, 'n_tokens_neox': 791, 'n_words': 155}