From b4d398b409070a76f0312ae7d351c03c7e85fb52 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Mon, 7 Apr 2025 18:36:44 -0700 Subject: [PATCH] quesoglc: unbreak, modernize --- pkgs/by-name/qu/quesoglc/package.nix | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/qu/quesoglc/package.nix b/pkgs/by-name/qu/quesoglc/package.nix index ff38dc30757a..caf85dd1e926 100644 --- a/pkgs/by-name/qu/quesoglc/package.nix +++ b/pkgs/by-name/qu/quesoglc/package.nix @@ -10,13 +10,15 @@ fribidi, libX11, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "quesoglc"; version = "0.7.2"; + src = fetchurl { - url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2"; - sha256 = "0cf9ljdzii5d4i2m23gdmf3kn521ljcldzq69lsdywjid3pg5zjl"; + url = "mirror://sourceforge/quesoglc/quesoglc-${finalAttrs.version}.tar.bz2"; + hash = "sha256-VP7y7mhRct80TQb/RpmkQRQ7h6vtDVFFJK3E+JukyTE="; }; + buildInputs = [ libGLU libGL @@ -26,8 +28,18 @@ stdenv.mkDerivation rec { fribidi libX11 ]; + + # required for cross builds + configureFlags = [ + "ac_cv_func_malloc_0_nonnull=yes" + "ac_cv_func_realloc_0_nonnull=yes" + "ac_cv_func_memcmp_working=yes" + ]; + + env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + # FIXME: Configure fails to use system glew. - meta = with lib; { + meta = { description = "Free implementation of the OpenGL Character Renderer"; longDescription = '' QuesoGLC is a free (as in free speech) implementation of the OpenGL @@ -36,8 +48,8 @@ stdenv.mkDerivation rec { platform that supports both FreeType and the OpenGL API. ''; homepage = "https://quesoglc.sourceforge.net/"; - license = licenses.lgpl21Plus; - maintainers = with maintainers; [ astsmtl ]; - platforms = platforms.linux; + license = lib.licenses.lgpl21Plus; + maintainers = with lib.maintainers; [ astsmtl ]; + platforms = lib.platforms.linux; }; -} +})