mpg123: Modernize and fix for cross
Do not even think about configureFlags unless in cross, to avoid hash breaking when not in cross.
This commit is contained in:
parent
502902f1c6
commit
7c754b1e3b
@ -1,4 +1,7 @@
|
|||||||
{stdenv, fetchurl, alsaLib }:
|
{ stdenv
|
||||||
|
, fetchurl, alsaLib
|
||||||
|
, buildPlatform, hostPlatform
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "mpg123-1.23.8";
|
name = "mpg123-1.23.8";
|
||||||
@ -10,10 +13,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
|
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
|
||||||
|
|
||||||
crossAttrs = {
|
${if buildPlatform != hostPlatform then "configureFlags" else null} =
|
||||||
configureFlags = if stdenv.cross ? mpg123 then
|
stdenv.lib.optional (hostPlatform ? mpg123) "--with-cpu=${hostPlatform.mpg123.cpu}";
|
||||||
"--with-cpu=${stdenv.cross.mpg123.cpu}" else "";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Fast console MPEG Audio Player and decoder library";
|
description = "Fast console MPEG Audio Player and decoder library";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user