about summary refs log tree commit diff
path: root/pkgs/development/guile-modules/guile-ncurses/default.nix
blob: abfa144ee57c002f819b4fbe778ebcdb7e528790 (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
{ lib
, stdenv
, fetchurl
, pkg-config
, guile
, libffi
, ncurses
}:

stdenv.mkDerivation rec {
  pname = "guile-ncurses";
  version = "1.7";

  src = fetchurl {
    url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
    hash = "sha256-JZPNoQuIl5XayUpm0RdWNg8TT2LZGDOuFoae9crZe5Q=";
  };

  nativeBuildInputs = [
    pkg-config
  ];
  buildInputs = [
    guile
    libffi
    ncurses
  ];

  preConfigure = ''
    configureFlags="$configureFlags --with-guilesitedir=$out/share/guile/site"
  '';

  postFixup = ''
    for f in $out/share/guile/site/ncurses/**.scm; do \
      substituteInPlace $f \
        --replace "libguile-ncurses" "$out/lib/libguile-ncurses"; \
    done
  '';

  # Undefined symbols for architecture arm64: "_u32_conv_from_encoding"
  env.NIX_LDFLAGS = "-lunistring";

  # XXX: 1 of 65 tests failed.
  doCheck = false;

  meta = with lib; {
    homepage = "https://www.gnu.org/software/guile-ncurses/";
    description = "Scheme interface to the NCurses libraries";
    longDescription = ''
      GNU Guile-Ncurses is a library for the Guile Scheme interpreter that
      provides functions for creating text user interfaces.  The text user
      interface functionality is built on the ncurses libraries: curses, form,
      panel, and menu.
    '';
    license = licenses.lgpl3Plus;
    maintainers = with maintainers; [ vyp ];
    platforms = guile.meta.platforms;
  };
}