summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-07 22:00:28 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-07 22:02:19 +0100
commit5bfd8093b72b0321354259cec9dc1050114a223c (patch)
tree62f21e77cc47b5edf70804c6dcd3307bb70ee069 /pkgs/tools
parent9efbb7e316a09ed088cd5070c3ede3d9d00bc10b (diff)
downloadnixpkgs-5bfd8093b72b0321354259cec9dc1050114a223c.tar
nixpkgs-5bfd8093b72b0321354259cec9dc1050114a223c.tar.gz
nixpkgs-5bfd8093b72b0321354259cec9dc1050114a223c.tar.bz2
nixpkgs-5bfd8093b72b0321354259cec9dc1050114a223c.tar.lz
nixpkgs-5bfd8093b72b0321354259cec9dc1050114a223c.tar.xz
nixpkgs-5bfd8093b72b0321354259cec9dc1050114a223c.tar.zst
nixpkgs-5bfd8093b72b0321354259cec9dc1050114a223c.zip
xwinmosaic: pull upstream fix for -fno-common toolchains
Without the change build fails as:

    $ nix build --impure --expr 'with import ./. {}; xwinmosaic.overrideAttrs (oa: {   NIX_CFLAGS_COMPILE = (oa.NIX_CFLAGS_COMPILE or "") + "-fno-common"; })'
    ld: CMakeFiles/xwinmosaic.dir/main.c.o:(.bss+0xc0):
      multiple definition of `a_NET_CURRENT_DESKTOP'; CMakeFiles/xwinmosaic.dir/x_interaction.c.o:(.bss+0xc0): first defined here
    ld: CMakeFiles/xwinmosaic.dir/main.c.o:(.bss+0xc8):
      multiple definition of `a_NET_DESKTOP_VIEWPORT'; CMakeFiles/xwinmosaic.dir/x_interaction.c.o:(.bss+0xc8): first defined here
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/X11/xwinmosaic/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/tools/X11/xwinmosaic/default.nix b/pkgs/tools/X11/xwinmosaic/default.nix
index af17f3ade7d..51ba815f1de 100644
--- a/pkgs/tools/X11/xwinmosaic/default.nix
+++ b/pkgs/tools/X11/xwinmosaic/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, gtk2, cmake, pkg-config, libXdamage }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, gtk2, cmake, pkg-config, libXdamage }:
 
 stdenv.mkDerivation rec {
   version = "0.4.2";
@@ -11,6 +11,16 @@ stdenv.mkDerivation rec {
     sha256 = "16qhrpgn84fz0q3nfvaz5sisc82zk6y7c0sbvbr69zfx5fwbs1rr";
   };
 
+  patches = [
+    # Pull upstream fix for -fno-common toolchains like upstream gcc-10:
+    #  https://github.com/soulthreads/xwinmosaic/pull/33
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/soulthreads/xwinmosaic/commit/a193a3f30850327066e5a93b29316cba2735e10d.patch";
+      sha256 = "0qpk802j5x6bsfvj6jqw1nz482jynwyk7yrrh4bsziwc53khm95q";
+    })
+  ];
+
   nativeBuildInputs = [ pkg-config cmake ];
   buildInputs = [ gtk2 libXdamage ];