git.iko.soy/typeable/nixpkgs
on master help sign in
mpg123: Modernize and fix for cross

Do not even think about configureFlags unless in cross, to avoid hash breaking when not in cross.

commit7c754b1e3bb769da01c49342bc23816605928bf8 authorJohn Ericson <Ericson2314@Yahoo.com> dateSun 4 Jun 2017, 19:24 (9 years ago) parent502902f
1 file changed+6−5
pkgs/applications/audio/mpg123/default.nix+6−5
pkgs/applications/audio/mpg123/default.nix+6−5
@@ -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";