1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 17:10:48 +00:00
nixpkgs/pkgs/development/libraries/newt/default.nix
John Ericson e755a8a27d treewide: Use targetPrefix instead of prefix for platform name prefixes
Certain tools, e.g. compilers, are customarily prefixed with the name of
their target platform so that multiple builds can be used at once
without clobbering each other on the PATH. I was using identifiers named
`prefix` for this purpose, but that conflicts with the standard use of
`prefix` to mean the directory where something is installed. To avoid
conflict and confusion, I renamed those to `targetPrefix`.
2017-11-27 03:15:50 -05:00

38 lines
945 B
Nix

{ fetchurl, stdenv, slang, popt }:
stdenv.mkDerivation rec {
name = "newt-0.52.15";
src = fetchurl {
url = "https://fedorahosted.org/releases/n/e/newt/${name}.tar.gz";
sha256 = "0hg2l0siriq6qrz6mmzr6l7rpl40ay56c8cak87rb2ks7s952qbs";
};
patchPhase = ''
sed -i -e s,/usr/bin/install,install, -e s,-I/usr/include/slang,, Makefile.in po/Makefile
'';
buildInputs = [ slang popt ];
NIX_LDFLAGS = "-lncurses";
preConfigure = ''
# If CPP is set explicitly, configure and make will not agree about which
# programs to use at different stages.
unset CPP
'';
crossAttrs = {
makeFlags = "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
};
meta = with stdenv.lib; {
homepage = https://fedorahosted.org/newt/;
description = "Library for color text mode, widget based user interfaces";
license = licenses.lgpl2;
platforms = platforms.linux;
maintainers = [ maintainers.viric ];
};
}