btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / gu / guile-ncurses / package.nix
blobe20da1d9f98c7e2ba8cc73df6fe98167a4a5c08a
1 { lib
2 , stdenv
3 , fetchurl
4 , pkg-config
5 , guile
6 , libffi
7 , ncurses
8 }:
10 stdenv.mkDerivation rec {
11   pname = "guile-ncurses";
12   version = "3.1";
14   src = fetchurl {
15     url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
16     hash = "sha256-7onozq/Kud0O8/wazJsQ9NIbpLJW0ynYQtYYPmP41zM=";
17   };
19   nativeBuildInputs = [
20     pkg-config
21   ];
22   buildInputs = [
23     guile
24     libffi
25     ncurses
26   ];
28   configureFlags = [
29     "--with-gnu-filesystem-hierarchy"
30   ];
32   env = lib.optionalAttrs stdenv.cc.isClang {
33     NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
34   };
36   postFixup = ''
37     for f in $out/${guile.siteDir}/ncurses/**.scm; do \
38       substituteInPlace $f \
39         --replace "libguile-ncurses" "$out/lib/guile/${guile.effectiveVersion}/libguile-ncurses"; \
40     done
41   '';
43   # XXX: 1 of 65 tests failed.
44   doCheck = false;
46   meta = with lib; {
47     homepage = "https://www.gnu.org/software/guile-ncurses/";
48     description = "Scheme interface to the NCurses libraries";
49     mainProgram = "guile-ncurses-shell";
50     longDescription = ''
51       GNU Guile-Ncurses is a library for the Guile Scheme interpreter that
52       provides functions for creating text user interfaces.  The text user
53       interface functionality is built on the ncurses libraries: curses, form,
54       panel, and menu.
55     '';
56     license = licenses.lgpl3Plus;
57     maintainers = with maintainers; [ vyp ];
58     platforms = guile.meta.platforms;
59   };