<commit_before>{ stdenv, fetchFromGitHub, nim, openssl }:

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

  version = "0.7.8";

  src = fetchFromGitHub {
    owner = "nim-lang";
    repo = "nimble";
    rev = "v${version}";
    sha256 = "12znxzj1j5fflw2mkkrns9n7qg6sf207652zrdyf7h2jdyzzb73x";
  };

  buildInputs = [ nim ];

  patchPhase = ''
    substituteInPlace src/nimble.nim.cfg --replace "./vendor/nim" "${nim}/share"
  '';

  buildPhase = ''
    nim c src/nimble
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp src/nimble $out/bin
    patchelf --set-rpath "${stdenv.lib.makeLibraryPath [stdenv.cc.libc openssl]}" \
        --add-needed libcrypto.so \
        "$out/bin/nimble"
  '';

  dontStrip = true;

  meta = with stdenv.lib; {
    description = "Package manager for the Nim programming language";
    homepage = https://github.com/nim-lang/nimble;
    license = licenses.bsd2;
    maintainers = with maintainers; [ kamilchm ];<commit_msg>nimble: Do not use patchelf.<commit_after>{ stdenv, fetchFromGitHub, nim, openssl }:

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

  version = "0.7.8";

  src = fetchFromGitHub {
    owner = "nim-lang";
    repo = "nimble";
    rev = "v${version}";
    sha256 = "12znxzj1j5fflw2mkkrns9n7qg6sf207652zrdyf7h2jdyzzb73x";
  };

  buildInputs = [ nim openssl ];

  patchPhase = ''
    substituteInPlace src/nimble.nim.cfg --replace "./vendor/nim" "${nim}/share"
    echo "--clib:crypto" >> src/nimble.nim.cfg
  '';

  buildPhase = ''
    cd src && nim c -d:release nimble
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp nimble $out/bin
  '';

  dontStrip = true;

  meta = with stdenv.lib; {
    description = "Package manager for the Nim programming language";
    homepage = https://github.com/nim-lang/nimble;
    license = licenses.bsd2;
    maintainers = with maintainers; [ kamilchm ];
{'fraction_non_alphanumeric': 0.14986666666666668, 'fraction_numerical': 0.02666666666666667, 'mean_word_length': 2.9745762711864407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3300822', 'n_tokens_mistral': 744, 'n_tokens_neox': 729, 'n_words': 141}