1 { lib, fetchurl, stdenv, slang, popt, python }:
4 pythonIncludePath = "${lib.getDev python}/include/python";
6 stdenv.mkDerivation rec {
11 url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.gz";
12 sha256 = "0cdvbancr7y4nrj8257y5n45hmhizr8isynagy4fpsnpammv8pi6";
16 sed -i -e s,/usr/bin/install,install, -e s,-I/usr/include/slang,, Makefile.in po/Makefile
18 substituteInPlace configure \
19 --replace "/usr/include/python" "${pythonIncludePath}"
20 substituteInPlace configure.ac \
21 --replace "/usr/include/python" "${pythonIncludePath}"
23 substituteInPlace Makefile.in \
24 --replace "ar rv" "${stdenv.cc.targetPrefix}ar rv"
28 nativeBuildInputs = [ python ];
29 buildInputs = [ slang popt ];
31 NIX_LDFLAGS = "-lncurses";
34 # If CPP is set explicitly, configure and make will not agree about which
35 # programs to use at different stages.
39 makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
40 "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
44 homepage = "https://pagure.io/newt";
45 description = "Library for color text mode, widget based user interfaces";
47 license = licenses.lgpl2;
48 platforms = platforms.linux;
49 maintainers = [ maintainers.viric ];