~aasg/nixexprs

ref: 5550f58e685f24c47d231549a47eaaf808c682b7 nixexprs/pkgs/development/guile-modules/guile-commonmark/default.nix -rw-r--r-- 1.7 KiB
5550f58e — Aluísio Augusto Silva Gonçalves Deprecate packages available in Nixpkgs 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig, guile }:

stdenv.mkDerivation rec {
  pname = "guile-commonmark";
  version = "0.1.2";

  src = fetchFromGitHub {
    owner = "OrangeShark";
    repo = "guile-commonmark";
    rev = "v${version}";
    sha256 = "1jn4idjlksq2vl4fgxgicgzz3hrcpdyr67v7jqyfaa4v4cidr059";
  };

  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
  '';

  doCheck = true;

  meta = with lib; {
    description = "CommonMark parser for Guile";
    longDescription = ''
      guile-commonmark is a library for parsing CommonMark, a fully
      specified variant of Markdown.  The library is written in Guile
      Scheme and is designed to transform a CommonMark document to
      SXML.  guile-commonmark tries to closely follow the CommonMark
      spec, the main difference is no support for parsing block and
      inline level HTML.
    '';
    homepage = "https://github.com/OrangeShark/guile-commonmark";
    license = licenses.lgpl3Plus;
    maintainers = with maintainers; [ AluisioASG ];
    platforms = platforms.gnu;
    hydraPlatforms = platforms.none;
  };
}