ed: Modernize and fix for cross

This commit is contained in:
John Ericson 2017-06-03 11:21:03 -04:00 committed by John Ericson
parent 05b3c87d9d
commit 7bdacad8b3

View file

@ -1,4 +1,6 @@
{ fetchurl, stdenv }:
{ stdenv, fetchurl
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
name = "ed-${version}";
@ -28,11 +30,12 @@ stdenv.mkDerivation rec {
make: *** [check] Error 127
*/
doCheck = !stdenv.isDarwin;
doCheck = !(hostPlatform.isDarwin || hostPlatform != buildPlatform);
crossAttrs = {
compileFlags = [ "CC=${stdenv.cross.config}-gcc" ];
};
configureFlags = if hostPlatform == buildPlatform then null else [
"--exec-prefix=${stdenv.cc.prefix}"
"CC=${stdenv.cc.prefix}cc"
];
meta = {
description = "An implementation of the standard Unix editor";