@@ -1,4 +1,4 @@
1−{ lib, stdenv, fetchFromGitHub }:
1+{ lib, stdenv, fetchFromGitHub, fetchpatch }:
22
33stdenv.mkDerivation {
44 pname = "wavegain";
@@ -11,6 +11,17 @@ stdenv.mkDerivation {
1111 sha256 = "0wghqnsbypmr4xcrhb568bfjdnxzzp8qgnws3jslzmzf34dpk5ls";
1212 };
1313
14+ patches = [
15+ # Upstream fix for -fno-common toolchains.
16+ (fetchpatch {
17+ name = "fno-common.patch";
18+ url = "https://github.com/MestreLion/wavegain/commit/ee5e0f9a0ce34c0cf2769ea6566685a54b938304.patch";
19+ sha256 = "11yi0czdn5h5bsqp23cww6yn9lm60cij8i1pzfwcfhgyf6f8ym1n";
20+ })
21+ ];
22+
23+ makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
24+
1425 installPhase = ''
1526 strip -s wavegain
1627 install -vD wavegain "$out/bin/wavegain"