From 50e9921179066d00de84c421332cfd3de2f52d28 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 25 Jan 2017 21:48:43 +0100 Subject: [PATCH] cmus: use clang's gcc compatibility for a clang based stdenv --- pkgs/applications/audio/cmus/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/audio/cmus/default.nix b/pkgs/applications/audio/cmus/default.nix index c0fb900e3ee7..bb2deb71ba20 100644 --- a/pkgs/applications/audio/cmus/default.nix +++ b/pkgs/applications/audio/cmus/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchFromGitHub, ncurses, pkgconfig -, gcc, libiconv, CoreAudio +{ stdenv, fetchFromGitHub, runCommand, ncurses, pkgconfig +, libiconv, CoreAudio , alsaSupport ? stdenv.isLinux, alsaLib ? null # simple fallback for everyone else @@ -90,6 +90,13 @@ let #(mkFlag vtxSupport "CONFIG_VTX=y" libayemu) ]; + clangGCC = runCommand "clang-gcc" {} '' + #! ${stdenv.shell} + mkdir -p $out/bin + ln -s ${stdenv.cc}/bin/clang $out/bin/gcc + ln -s ${stdenv.cc}/bin/clang++ $out/bin/g++ + ''; + in stdenv.mkDerivation rec { @@ -111,7 +118,7 @@ stdenv.mkDerivation rec { ] ++ concatMap (a: a.flags) opts); buildInputs = [ ncurses pkgconfig ] - ++ stdenv.lib.optional stdenv.cc.isClang gcc + ++ stdenv.lib.optional stdenv.cc.isClang clangGCC ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv CoreAudio ] ++ concatMap (a: a.deps) opts;