<commit_before>{ lib, stdenv
, fetchurl
, autoreconfHook
, pari
, ntl
, gmp
# "FLINT is optional and only used for one part of sparse matrix reduction,
# which is used in the modular symbol code but not mwrank or other elliptic
# curve programs." -- https://github.com/JohnCremona/eclib/blob/master/README
, withFlint ? false, flint ? null
}:

assert withFlint -> flint != null;

stdenv.mkDerivation rec {
  pname = "eclib";
  version = "20220621"; # upgrade might break the sage interface
  # sage tests to run:
  # src/sage/interfaces/mwrank.py
  # src/sage/libs/eclib
  # ping @timokau for more info
  src = fetchurl {
    # all releases for this project appear on its GitHub releases page
    # by definition! other distros sometimes update whenever they see
    # a version bump in configure.ac or a new tag (and this might show
    # up on repology). however, a version bump or a new tag may not
    # represent a new release, and a new release might not be tagged.
    #
    # see https://github.com/JohnCremona/eclib/issues/64#issuecomment-789788561
    # for upstream's explanation of the above
    url = "https://github.com/JohnCremona/eclib/releases/download/${version}/eclib-${version}.tar.bz2";
    sha256 = "sha256-EfoCNhnXGuN5SxgPFES4BaevhSRzU1JvT3ARq9NMJhM=";
  };
  buildInputs = [
    pari
    ntl<commit_msg>eclib: 20220621 -> 20221012<commit_after>{ lib, stdenv
, fetchurl
, autoreconfHook
, pari
, ntl
, gmp
# "FLINT is optional and only used for one part of sparse matrix reduction,
# which is used in the modular symbol code but not mwrank or other elliptic
# curve programs." -- https://github.com/JohnCremona/eclib/blob/master/README
, withFlint ? false, flint ? null
}:

assert withFlint -> flint != null;

stdenv.mkDerivation rec {
  pname = "eclib";
  version = "20221012"; # upgrade might break the sage interface
  # sage tests to run:
  # src/sage/interfaces/mwrank.py
  # src/sage/libs/eclib
  # ping @timokau for more info
  src = fetchurl {
    # all releases for this project appear on its GitHub releases page
    # by definition! other distros sometimes update whenever they see
    # a version bump in configure.ac or a new tag (and this might show
    # up on repology). however, a version bump or a new tag may not
    # represent a new release, and a new release might not be tagged.
    #
    # see https://github.com/JohnCremona/eclib/issues/64#issuecomment-789788561
    # for upstream's explanation of the above
    url = "https://github.com/JohnCremona/eclib/releases/download/${version}/eclib-${version}.tar.bz2";
    sha256 = "sha256-TPavWyn6BMt7fAo19rrlPICPbK/XKstBruB/ka1adBc=";
  };
  buildInputs = [
    pari
    ntl
{'fraction_non_alphanumeric': 0.09557721139430285, 'fraction_numerical': 0.02923538230884558, 'mean_word_length': 3.5008431703204046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6071967', 'n_tokens_mistral': 963, 'n_tokens_neox': 881, 'n_words': 289}