2020-10-27 01:52:46 +01:00
|
|
|
{ lib, fetchurl, stdenv, slang, popt, python }:
|
2012-01-06 17:45:14 +01:00
|
|
|
|
2020-10-27 01:52:46 +01:00
|
|
|
let
|
|
|
|
pythonIncludePath = "${lib.getDev python}/include/python";
|
|
|
|
in
|
2012-01-06 17:45:14 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-29 01:40:13 +02:00
|
|
|
pname = "newt";
|
|
|
|
version = "0.52.21";
|
2012-01-06 17:45:14 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-05-29 01:40:13 +02:00
|
|
|
url = "https://fedorahosted.org/releases/n/e/${pname}/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "0cdvbancr7y4nrj8257y5n45hmhizr8isynagy4fpsnpammv8pi6";
|
2012-01-06 17:45:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e s,/usr/bin/install,install, -e s,-I/usr/include/slang,, Makefile.in po/Makefile
|
2020-10-27 01:52:46 +01:00
|
|
|
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace "/usr/include/python" "${pythonIncludePath}"
|
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace "/usr/include/python" "${pythonIncludePath}"
|
2012-01-06 17:45:14 +01:00
|
|
|
'';
|
|
|
|
|
2020-10-27 01:52:46 +01:00
|
|
|
buildInputs = [ slang popt python ];
|
2012-01-06 17:45:14 +01:00
|
|
|
|
2015-10-06 11:52:25 +02:00
|
|
|
NIX_LDFLAGS = "-lncurses";
|
|
|
|
|
2017-07-20 17:42:58 +02:00
|
|
|
preConfigure = ''
|
|
|
|
# If CPP is set explicitly, configure and make will not agree about which
|
|
|
|
# programs to use at different stages.
|
|
|
|
unset CPP
|
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
2018-09-04 19:35:20 +02:00
|
|
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
|
|
|
];
|
2012-01-06 17:45:14 +01:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://fedorahosted.org/newt/";
|
2012-01-06 17:45:14 +01:00
|
|
|
description = "Library for color text mode, widget based user interfaces";
|
|
|
|
|
2015-10-06 11:52:25 +02:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.viric ];
|
2012-01-06 17:45:14 +01:00
|
|
|
};
|
|
|
|
}
|