about summary refs log tree commit diff
path: root/pkgs/applications/audio/gtkpod
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-14 18:15:05 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-14 18:15:45 +0100
commit8feed1d21531860d8245266e4c6f2338fab407c7 (patch)
tree91005f9fac5e7c4ca13ff69494a2f0124385d742 /pkgs/applications/audio/gtkpod
parent197681059f0fff10d7abd75d11f36654ea063e92 (diff)
downloadnixlib-8feed1d21531860d8245266e4c6f2338fab407c7.tar
nixlib-8feed1d21531860d8245266e4c6f2338fab407c7.tar.gz
nixlib-8feed1d21531860d8245266e4c6f2338fab407c7.tar.bz2
nixlib-8feed1d21531860d8245266e4c6f2338fab407c7.tar.lz
nixlib-8feed1d21531860d8245266e4c6f2338fab407c7.tar.xz
nixlib-8feed1d21531860d8245266e4c6f2338fab407c7.tar.zst
nixlib-8feed1d21531860d8245266e4c6f2338fab407c7.zip
gtkpod: add -fcommon workaround
Workaround build failure on -fno-common toolchains like upstream
gcc-10. Otherwise build fails as:

    ld: .libs/autodetection.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: multiple definition of
      `gtkpod_app'; .libs/gtkpod_app_iface.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: first defined here
Diffstat (limited to 'pkgs/applications/audio/gtkpod')
-rw-r--r--pkgs/applications/audio/gtkpod/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/applications/audio/gtkpod/default.nix b/pkgs/applications/audio/gtkpod/default.nix
index e741f6fe2982..220d2d38e145 100644
--- a/pkgs/applications/audio/gtkpod/default.nix
+++ b/pkgs/applications/audio/gtkpod/default.nix
@@ -11,6 +11,9 @@ stdenv.mkDerivation rec {
     url = "mirror://sourceforge/gtkpod/${pname}-${version}.tar.gz";
     sha256 = "0xisrpx069f7bjkyc8vqxb4k0480jmx1wscqxr6cpq1qj6pchzd5";
   };
+  postPatch = ''
+    sed -i 's/which/type -P/' scripts/*.sh
+  '';
 
   nativeBuildInputs = [ pkg-config wrapGAppsHook intltool ];
   buildInputs = [
@@ -19,15 +22,17 @@ stdenv.mkDerivation rec {
     gdl gnome.adwaita-icon-theme gnome.anjuta
   ] ++ (with perlPackages; [ perl XMLParser ]);
 
-  patchPhase = ''
-    sed -i 's/which/type -P/' scripts/*.sh
-  '';
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: .libs/autodetection.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: multiple definition of
+  #       `gtkpod_app'; .libs/gtkpod_app_iface.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: first defined here
+  NIX_CFLAGS_COMPILE = "-fcommon";
 
   enableParallelBuilding = true;
 
   meta = with lib; {
     description = "GTK Manager for an Apple ipod";
-    homepage = "http://gtkpod.sourceforge.net";
+    homepage = "https://sourceforge.net/projects/gtkpod/";
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
     maintainers = [ maintainers.skeidel ];