diff --git a/pkgs/tools/misc/ttyrec/default.nix b/pkgs/tools/misc/ttyrec/default.nix index a836a2a0d0e9..238d2d73d3bb 100644 --- a/pkgs/tools/misc/ttyrec/default.nix +++ b/pkgs/tools/misc/ttyrec/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, buildPlatform }: stdenv.mkDerivation rec { name = "ttyrec-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { patches = [ ./clang-fixes.patch ]; - makeFlags = [ "CFLAGS=-DSVR4" ] + makeFlags = stdenv.lib.optional buildPlatform.isLinux "CFLAGS=-DSVR4" ++ stdenv.lib.optional stdenv.cc.isClang "CC=clang"; installPhase = ''