summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-15 17:01:22 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-15 17:01:22 +0100
commite58ce95275ecb4db0b544892f0983309ccc13b3d (patch)
treeda21ecc6d6e0504a63a90cfc8a81c1ca82d0eb59
parent09692a459cfef32f0f6e2967a5f39c3234a673fe (diff)
downloadnixpkgs-e58ce95275ecb4db0b544892f0983309ccc13b3d.tar
nixpkgs-e58ce95275ecb4db0b544892f0983309ccc13b3d.tar.gz
nixpkgs-e58ce95275ecb4db0b544892f0983309ccc13b3d.tar.bz2
nixpkgs-e58ce95275ecb4db0b544892f0983309ccc13b3d.tar.lz
nixpkgs-e58ce95275ecb4db0b544892f0983309ccc13b3d.tar.xz
nixpkgs-e58ce95275ecb4db0b544892f0983309ccc13b3d.tar.zst
nixpkgs-e58ce95275ecb4db0b544892f0983309ccc13b3d.zip
kmscube: pull upstream fix for -fno-common toolchains
Without the change build against upstream gcc-10 fails as:

    ld: kmscube-cube-tex.o:/build/kmscube-9dcce71/cube-tex.c:48: multiple definition of `gl';
      kmscube-cube-smooth.o:/build/kmscube-9dcce71/cube-smooth.c:40: first defined here
-rw-r--r--pkgs/os-specific/linux/kmscube/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/kmscube/default.nix b/pkgs/os-specific/linux/kmscube/default.nix
index 53b4cd60fb1..b9da3790170 100644
--- a/pkgs/os-specific/linux/kmscube/default.nix
+++ b/pkgs/os-specific/linux/kmscube/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchgit, autoreconfHook, libdrm, libX11, libGL, mesa, pkg-config }:
+{ lib, stdenv, fetchgit, fetchpatch, autoreconfHook, libdrm, libX11, libGL, mesa, pkg-config }:
 
 stdenv.mkDerivation {
   pname = "kmscube";
@@ -10,6 +10,15 @@ stdenv.mkDerivation {
     sha256 = "1q5b5yvyfj3127385mp1bfmcbnpnbdswdk8gspp7g4541xk4k933";
   };
 
+  patches = [
+    # Pull upstream patch for -fno-common toolchains.
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://gitlab.freedesktop.org/mesa/kmscube/-/commit/908ef39864442c0807954af5d3f88a3da1a6f8a5.patch";
+      sha256 = "1gxn3b50mvjlc25234839v5z29r8fd9di4176a3yx4gbsz8cc5vi";
+    })
+  ];
+
   nativeBuildInputs = [ autoreconfHook pkg-config ];
   buildInputs = [ libdrm libX11 libGL mesa ];