@@ -1,4 +1,6 @@
1−{ fetchurl, stdenv }:
1+{ stdenv, fetchurl
2+, buildPlatform, hostPlatform
3+}:
24
35stdenv.mkDerivation rec {
46 name = "ed-${version}";
@@ -28,11 +30,12 @@ stdenv.mkDerivation rec {
2830 make: *** [check] Error 127
2931
3032 */
31− doCheck = !stdenv.isDarwin;
33+ doCheck = !(hostPlatform.isDarwin || hostPlatform != buildPlatform);
3234
33− crossAttrs = {
34− compileFlags = [ "CC=${stdenv.cross.config}-gcc" ];
35− };
35+ configureFlags = if hostPlatform == buildPlatform then null else [
36+ "--exec-prefix=${stdenv.cc.prefix}"
37+ "CC=${stdenv.cc.prefix}cc"
38+ ];
3639
3740 meta = {
3841 description = "An implementation of the standard Unix editor";