3
0
Fork 0
forked from mirrors/nixpkgs

freeglut: pull upstream fix for -fno-common compiler

Fixes build failure against upstream gcc (defaults -fno-common).
This commit is contained in:
Sergei Trofimovich 2021-09-12 09:54:47 +01:00
parent d370d9ee99
commit 11ed659b23

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, libXi, libXrandr, libXxf86vm, libGL, libGLU, xlibsWrapper, cmake }:
{ lib, stdenv, fetchurl, fetchpatch, libXi, libXrandr, libXxf86vm, libGL, libGLU, xlibsWrapper, cmake }:
stdenv.mkDerivation rec {
pname = "freeglut";
@ -9,6 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "0s6sk49q8ijgbsrrryb7dzqx2fa744jhx1wck5cz5jia2010w06l";
};
patches = [
(fetchpatch {
# upstream build fix against -fno-common compilers like >=gcc-10
url = "https://github.com/dcnieho/FreeGLUT/commit/b9998bbc1e1c329f6bf69c24606a2be7a4973b8c.patch";
sha256 = "0j43vrnm22mz3r3c43szgcnil19cx9vcydzky9gwzqlyacr51swd";
stripLen = 2;
})
];
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake ];