1 { lib, stdenv, fetchurl
11 stdenv.mkDerivation rec {
16 url = "https://www.jedsoft.org/releases/slang/${pname}-${version}.tar.bz2";
17 sha256 = "sha256-+RRQVK4TGXPGEgjqgkhtXdEOPFza0jt8SgYXdDyPWhg=";
20 outputs = [ "out" "dev" "man" "doc" ];
22 # Fix some wrong hardcoded paths
24 sed -ie "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" configure
25 sed -ie "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" src/sltermin.c
26 sed -ie "s|/bin/ln|ln|" src/Makefile.in
27 sed -ie "s|-ltermcap|-lncurses|" ./configure
31 "--with-pcre=${pcre.dev}"
32 "--with-png=${libpng.dev}"
33 "--with-readline=${readline.dev}"
34 "--with-z=${zlib.dev}"
42 ] ++ lib.optionals (stdenv.isDarwin) [ libiconv ];
44 propagatedBuildInputs = [ ncurses ];
46 buildFlags = lib.optional stdenv.hostPlatform.isStatic "static";
47 installTargets = lib.optional stdenv.hostPlatform.isStatic "install-static";
50 makeFlagsArray+=(AR_CR="${stdenv.cc.targetPrefix}ar cr")
53 enableParallelBuilding = true;
56 find "$out"/lib/ -name '*.so' -exec chmod +x "{}" \;
57 sed '/^Libs:/s/$/ -lncurses/' -i "$dev"/lib/pkgconfig/slang.pc
61 updateScript = writeScript "update-slang" ''
62 #!/usr/bin/env nix-shell
63 #!nix-shell -i bash -p curl pcre common-updater-scripts
67 # Expect the text in format of 'Version 2.3.3</td>'
68 new_version="$(curl -s https://www.jedsoft.org/slang/ |
69 pcregrep -o1 'Version ([0-9.]+)</td>')"
70 update-source-version ${pname} "$new_version"
75 description = "A small, embeddable multi-platform programming library";
77 S-Lang is an interpreted language that was designed from the start to be
78 easily embedded into a program to provide it with a powerful extension
79 language. Examples of programs that use S-Lang as an extension language
80 include the jed text editor and the slrn newsreader. Although S-Lang does
81 not exist as a separate application, it is distributed with a quite
82 capable program called slsh ("slang-shell") that embeds the interpreter
83 and allows one to execute S-Lang scripts, or simply experiment with S-Lang
84 at an interactive prompt. Many of the the examples in this document are
85 presented in the context of one of the above applications.
87 S-Lang is also a programmer's library that permits a programmer to develop
88 sophisticated platform-independent software. In addition to providing the
89 S-Lang interpreter, the library provides facilities for screen management,
90 keymaps, low-level terminal I/O, etc. However, this document is concerned
91 only with the extension language and does not address these other features
92 of the S-Lang library. For information about the other components of the
93 library, the reader is referred to the S-Lang Library C Programmer's
96 homepage = "http://www.jedsoft.org/slang/";
97 license = licenses.gpl2Plus;
98 maintainers = with maintainers; [ AndersonTorres ];
100 platforms = platforms.unix;