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