From 8b501a1089c346ea6efcddd6de18015512467493 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 5 Jun 2022 22:12:24 +0300 Subject: [PATCH] rss-glx: fix build --- pkgs/misc/screensavers/rss-glx/cstddef.patch | 12 ++++++++++++ pkgs/misc/screensavers/rss-glx/default.nix | 20 ++++++++++++++++++-- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 pkgs/misc/screensavers/rss-glx/cstddef.patch diff --git a/pkgs/misc/screensavers/rss-glx/cstddef.patch b/pkgs/misc/screensavers/rss-glx/cstddef.patch new file mode 100644 index 0000000000000..8bec510b04050 --- /dev/null +++ b/pkgs/misc/screensavers/rss-glx/cstddef.patch @@ -0,0 +1,12 @@ +diff --git i/src/Implicit/impSurface.h w/src/Implicit/impSurface.h +index 41fab81..027587f 100644 +--- i/src/Implicit/impSurface.h ++++ w/src/Implicit/impSurface.h +@@ -25,6 +25,7 @@ + #ifdef WIN32 + #include + #endif ++#include + #include + #include + diff --git a/pkgs/misc/screensavers/rss-glx/default.nix b/pkgs/misc/screensavers/rss-glx/default.nix index 981db782c7c92..a90b5d65653e0 100644 --- a/pkgs/misc/screensavers/rss-glx/default.nix +++ b/pkgs/misc/screensavers/rss-glx/default.nix @@ -1,4 +1,16 @@ -{lib, stdenv, fetchurl, pkg-config, xlibsWrapper, libXext, libGLU, libGL, imagemagick6, libtiff, bzip2}: +{ lib +, stdenv +, fetchurl +, autoconf +, pkg-config +, xlibsWrapper +, libXext +, libGLU +, libGL +, imagemagick6 +, libtiff +, bzip2 +}: stdenv.mkDerivation rec { version = "0.9.1"; @@ -9,9 +21,13 @@ stdenv.mkDerivation rec { sha256 = "1aikafjqrfmv23jnrrm5d56dg6injh4l67zjdxzdapv9chw7g3cg"; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ autoconf pkg-config ]; buildInputs = [ libGLU libGL xlibsWrapper imagemagick6 libtiff bzip2 ]; + patches = [ + ./cstddef.patch + ]; + NIX_CFLAGS_COMPILE = "-I${imagemagick6.dev}/include/ImageMagick"; NIX_LDFLAGS= "-rpath ${libXext}/lib"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a2c3b14d28119..ba3ec0cdbd4b2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34562,7 +34562,7 @@ with pkgs; stdenv = gccStdenv; }; - rss-glx = callPackage ../misc/screensavers/rss-glx { stdenv = gcc10StdenvCompat; }; + rss-glx = callPackage ../misc/screensavers/rss-glx { }; run-scaled = callPackage ../tools/X11/run-scaled { };