diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2017-06-04 19:24:50 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-06-22 17:53:55 -0400 |
commit | 7c754b1e3bb769da01c49342bc23816605928bf8 (patch) | |
tree | 1cc46d13c2444bc3fc55c54d9869ba536414a841 /pkgs/applications/audio/mpg123/default.nix | |
parent | 502902f1c6d16faec2ecca669e4cc77987fb676f (diff) |
mpg123: Modernize and fix for cross
Do not even think about configureFlags unless in cross, to avoid hash breaking when not in cross.
Diffstat (limited to 'pkgs/applications/audio/mpg123/default.nix')
-rw-r--r-- | pkgs/applications/audio/mpg123/default.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/applications/audio/mpg123/default.nix b/pkgs/applications/audio/mpg123/default.nix index 9004a46115eed..2909dd70ce9ac 100644 --- a/pkgs/applications/audio/mpg123/default.nix +++ b/pkgs/applications/audio/mpg123/default.nix @@ -1,4 +1,7 @@ -{stdenv, fetchurl, alsaLib }: +{ stdenv +, fetchurl, alsaLib +, buildPlatform, hostPlatform +}: stdenv.mkDerivation rec { name = "mpg123-1.23.8"; @@ -10,10 +13,8 @@ stdenv.mkDerivation rec { buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib; - crossAttrs = { - configureFlags = if stdenv.cross ? mpg123 then - "--with-cpu=${stdenv.cross.mpg123.cpu}" else ""; - }; + ${if buildPlatform != hostPlatform then "configureFlags" else null} = + stdenv.lib.optional (hostPlatform ? mpg123) "--with-cpu=${hostPlatform.mpg123.cpu}"; meta = { description = "Fast console MPEG Audio Player and decoder library"; |