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 | |
parent | 502902f1c6d16faec2ecca669e4cc77987fb676f (diff) | |
download | nixlib-7c754b1e3bb769da01c49342bc23816605928bf8.tar nixlib-7c754b1e3bb769da01c49342bc23816605928bf8.tar.gz nixlib-7c754b1e3bb769da01c49342bc23816605928bf8.tar.bz2 nixlib-7c754b1e3bb769da01c49342bc23816605928bf8.tar.lz nixlib-7c754b1e3bb769da01c49342bc23816605928bf8.tar.xz nixlib-7c754b1e3bb769da01c49342bc23816605928bf8.tar.zst nixlib-7c754b1e3bb769da01c49342bc23816605928bf8.zip |
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')
-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 9004a46115ee..2909dd70ce9a 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"; |