From 7bdacad8b39568611e84da5aa3b37e4e70641012 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 3 Jun 2017 11:21:03 -0400 Subject: [PATCH] ed: Modernize and fix for cross --- pkgs/applications/editors/ed/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/ed/default.nix b/pkgs/applications/editors/ed/default.nix index ec56667a4ba6..053e1d22af31 100644 --- a/pkgs/applications/editors/ed/default.nix +++ b/pkgs/applications/editors/ed/default.nix @@ -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";