@@ -1,4 +1,7 @@
1−{stdenv, fetchurl, alsaLib }:
1+{ stdenv
2+, fetchurl, alsaLib
3+, buildPlatform, hostPlatform
4+}:
25
36stdenv.mkDerivation rec {
47 name = "mpg123-1.23.8";
@@ -10,10 +13,8 @@ stdenv.mkDerivation rec {
1013
1114 buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
1215
13− crossAttrs = {
14− configureFlags = if stdenv.cross ? mpg123 then
15− "--with-cpu=${stdenv.cross.mpg123.cpu}" else "";
16− };
16+ ${if buildPlatform != hostPlatform then "configureFlags" else null} =
17+ stdenv.lib.optional (hostPlatform ? mpg123) "--with-cpu=${hostPlatform.mpg123.cpu}";
1718
1819 meta = {
1920 description = "Fast console MPEG Audio Player and decoder library";