<commit_before>{ stdenv, fetchFromGitHub
, cmake, pkgconfig, coreutils
, boost, cryptopp, curl, fuse, openssl, python, spdlog
}:

stdenv.mkDerivation rec {
  name = "cryfs-${version}";
  version = "0.9.9";

  src = fetchFromGitHub {
    owner  = "cryfs";
    repo   = "cryfs";
    rev    = "${version}";
    sha256 = "07f2k2b595m3vkwwlmlc0m7px0nwrrzrph3z6sss9354m0b0lcri";
  };

  prePatch = ''
    patchShebangs src

    substituteInPlace vendor/scrypt/CMakeLists.txt \
      --replace /usr/bin/ ""

    # scrypt in nixpkgs only produces a binary so we lift the patching from that so allow
    # building the vendored version. This is very much NOT DRY.
    # The proper solution is to have scrypt generate a dev output with the required files and just symlink
    # into vendor/scrypt
    for f in Makefile.in autocrap/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh ; do
      substituteInPlace vendor/scrypt/scrypt-*/scrypt/$f --replace "command -p " ""
    done

    # cryfs is vendoring an old version of spdlog
    rm -rf vendor/spdlog/spdlog
    ln -s ${spdlog} vendor/spdlog/spdlog
  '';

  buildInputs = [ boost cryptopp curl fuse openssl python spdlog ];
<commit_msg>cryfs: 0.9.9 -> 0.9.10 (#54850)<commit_after>{ stdenv, fetchFromGitHub
, cmake, pkgconfig, coreutils
, boost, cryptopp, curl, fuse, openssl, python, spdlog
}:

stdenv.mkDerivation rec {
  name = "cryfs-${version}";
  version = "0.9.10";

  src = fetchFromGitHub {
    owner  = "cryfs";
    repo   = "cryfs";
    rev    = "${version}";
    sha256 = "04yqpad8x0hiiwpykcn3swi0py6sg9xid6g15ny2qs4j3llin5ry";
  };

  prePatch = ''
    patchShebangs src

    substituteInPlace vendor/scrypt/CMakeLists.txt \
      --replace /usr/bin/ ""

    # scrypt in nixpkgs only produces a binary so we lift the patching from that so allow
    # building the vendored version. This is very much NOT DRY.
    # The proper solution is to have scrypt generate a dev output with the required files and just symlink
    # into vendor/scrypt
    for f in Makefile.in autocrap/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh ; do
      substituteInPlace vendor/scrypt/scrypt-*/scrypt/$f --replace "command -p " ""
    done

    # cryfs is vendoring an old version of spdlog
    rm -rf vendor/spdlog/spdlog
    ln -s ${spdlog} vendor/spdlog/spdlog
  '';

  buildInputs = [ boost cryptopp curl fuse openssl python spdlog ];

{'fraction_non_alphanumeric': 0.10129761406446212, 'fraction_numerical': 0.0246965257429887, 'mean_word_length': 3.1493055555555554, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5095069', 'n_tokens_mistral': 893, 'n_tokens_neox': 844, 'n_words': 239}