about summary refs log tree commit diff
path: root/pkgs/applications/audio/aumix
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-01-16 17:44:45 +0000
committerSergei Trofimovich <slyich@gmail.com>2022-01-16 17:46:27 +0000
commitbc63d4eab40e3b9fa3fbe773974971db37890ba2 (patch)
tree1d7a94106702c7e2aaf29307c121f9b80e44907c /pkgs/applications/audio/aumix
parentd0a7fc845df6ae2fc58dc0539361ca6082dbe138 (diff)
downloadnixlib-bc63d4eab40e3b9fa3fbe773974971db37890ba2.tar
nixlib-bc63d4eab40e3b9fa3fbe773974971db37890ba2.tar.gz
nixlib-bc63d4eab40e3b9fa3fbe773974971db37890ba2.tar.bz2
nixlib-bc63d4eab40e3b9fa3fbe773974971db37890ba2.tar.lz
nixlib-bc63d4eab40e3b9fa3fbe773974971db37890ba2.tar.xz
nixlib-bc63d4eab40e3b9fa3fbe773974971db37890ba2.tar.zst
nixlib-bc63d4eab40e3b9fa3fbe773974971db37890ba2.zip
aumix: fix build against fno-common toolchains
Pull Gentoo fix to avoid build failures like:

    $ nix build --impure --expr 'with import ./.{}; aumix.override { stdenv = clang12Stdenv; }' -L
    ...
    aumix> ld: mouse.o:/build/aumix-2.9.1/src/./common.h:132:
      multiple definition of `ourlevel'; common.o:/build/aumix-2.9.1/src/./common.h:132: first defined here
Diffstat (limited to 'pkgs/applications/audio/aumix')
-rw-r--r--pkgs/applications/audio/aumix/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/applications/audio/aumix/default.nix b/pkgs/applications/audio/aumix/default.nix
index 51dda20cc3a1..2603e88fcbdb 100644
--- a/pkgs/applications/audio/aumix/default.nix
+++ b/pkgs/applications/audio/aumix/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchurl
+, fetchpatch
 , gettext
 , ncurses
 , gtkGUI ? false
@@ -17,6 +18,16 @@ stdenv.mkDerivation rec {
     sha256 = "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj";
   };
 
+  patches = [
+    # Pull Gentoo fix for -fno-common toolchains. Upstream does not
+    # seem to have the contacts
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/aumix/files/aumix-2.9.1-fno-common.patch?id=496c9ec7355f06f6d1d19be780a6981503e6df1f";
+      sha256 = "0qwylhx1hawsmx1pc7ykrjq9phksc73dq9rss6ggq15n3ggnc95y";
+    })
+  ];
+
   buildInputs = [ gettext ncurses ]
     ++ lib.optionals gtkGUI [ pkg-config gtk2 ];