From e4e0b934c7709594fa90c9693f4e752c77ac5869 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 25 Oct 2025 20:45:21 +0200 Subject: [PATCH] pslib: fix build --- pkgs/by-name/ps/pslib/cmake4.patch | 18 ++++++++++++++++++ pkgs/by-name/ps/pslib/package.nix | 8 ++++---- 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 pkgs/by-name/ps/pslib/cmake4.patch diff --git a/pkgs/by-name/ps/pslib/cmake4.patch b/pkgs/by-name/ps/pslib/cmake4.patch new file mode 100644 index 000000000000..7fe5bc3d94e7 --- /dev/null +++ b/pkgs/by-name/ps/pslib/cmake4.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 58a5b45..b41e6a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,3 +1,5 @@ ++cmake_minimum_required(VERSION 3.10) ++ + PROJECT(pslib C) + option(ENABLE_BMP "Build with BMP support" ON) + +@@ -73,7 +75,6 @@ INCLUDE(CheckFunctionExists) + INCLUDE(TestBigEndian) + test_big_endian(WORDS_BIGENDIAN) + +-SUBDIRS( src ) + SET(SOURCES + src/pslib.c + src/ps_memory.c \ No newline at end of file diff --git a/pkgs/by-name/ps/pslib/package.nix b/pkgs/by-name/ps/pslib/package.nix index e11d87fc2db3..81bf538df8d9 100644 --- a/pkgs/by-name/ps/pslib/package.nix +++ b/pkgs/by-name/ps/pslib/package.nix @@ -21,6 +21,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-gaWNvBLuUUy0o+HWCOyG6KmzxDrYCY6PV3WbA/jjH64="; }; + patches = [ + ./cmake4.patch + ]; + nativeBuildInputs = [ cmake pkg-config @@ -33,10 +37,6 @@ stdenv.mkDerivation rec { libtiff ]; - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; - }; - doCheck = true; outputs = [