From 4c14d1c5979529f7b3102426bfb840b06a7dcb45 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Fri, 9 May 2025 23:06:14 +0100 Subject: [PATCH 1/2] pstoedit: fix build on darwin fix hint from homebrew --- pkgs/by-name/ps/pstoedit/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/ps/pstoedit/package.nix b/pkgs/by-name/ps/pstoedit/package.nix index 3a09cd624692..6bf494702eb2 100644 --- a/pkgs/by-name/ps/pstoedit/package.nix +++ b/pkgs/by-name/ps/pstoedit/package.nix @@ -23,6 +23,11 @@ stdenv.mkDerivation rec { hash = "sha256-VYi0MtLGsq2YKLRJFepYE/+aOjMSpB+g3kw43ayd9y8="; }; + postPatch = '' + # don't use gnu-isms like link.h on macos + substituteInPlace src/pstoedit.cpp --replace-fail '#ifndef _MSC_VER' '#if !defined(_MSC_VER) && !defined(__APPLE__)' + ''; + outputs = [ "out" "dev" From e36885f3c771673c92ac76d52c8c895305459e1e Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Fri, 9 May 2025 23:06:56 +0100 Subject: [PATCH 2/2] pstoedit: remove LIBPNG_LDFLAGS substitution this is no longer present in config/pstoedit.pc.in --- pkgs/by-name/ps/pstoedit/package.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/by-name/ps/pstoedit/package.nix b/pkgs/by-name/ps/pstoedit/package.nix index 6bf494702eb2..6b93fb4ec998 100644 --- a/pkgs/by-name/ps/pstoedit/package.nix +++ b/pkgs/by-name/ps/pstoedit/package.nix @@ -50,12 +50,6 @@ stdenv.mkDerivation rec { libiconv ]; - # '@LIBPNG_LDFLAGS@' is no longer substituted by autoconf (the code is commented out) - # so we need to remove it from the pkg-config file as well - preConfigure = '' - substituteInPlace config/pstoedit.pc.in --replace '@LIBPNG_LDFLAGS@' "" - ''; - postInstall = '' wrapProgram $out/bin/pstoedit \ --prefix PATH : ${lib.makeBinPath [ ghostscript ]}