~aasg/nixexprs

57cd14f2c3005c469386219d7f4ba102fc505f26 — Aluísio Augusto Silva Gonçalves a month ago 31c0fb9
guile-commonmark: Fix and enable tests
1 files changed, 15 insertions(+), 0 deletions(-)

M pkgs/development/guile-modules/guile-commonmark/default.nix
M pkgs/development/guile-modules/guile-commonmark/default.nix => pkgs/development/guile-modules/guile-commonmark/default.nix +15 -0
@@ 14,11 14,26 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [ autoreconfHook pkgconfig ];
  buildInputs = [ guile ];

  # Needed for tests.
  LANG = "C.UTF-8";
  postPatch = ''
    # Some tests hardcode a call to setlocale for en_US.UTF-8, but that isn't
    # included in the default build environment.  And other test files that do
    # need a Unicode locale (e.g. tests/inlines/emphasis.scm) don't call
    # setlocale.  Thankfully, Guile automatically loads the locale set in the
    # environment by default (see the GUILE_INSTALL_LOCALE environment
    # variable), so these calls are actually unnecessary as long as the
    # environment is set up properly (which we do in the derivation).
    sed -i '/setlocale/d' tests/inlines/*.scm
  '';

  makeFlags = [
    "moddir=$(out)/share/guile/site"
    "godir=$(out)/share/guile/site/site-ccache"
  ];

  doCheck = true;

  meta = with lib; {
    description = "CommonMark parser for Guile";
    longDescription = ''