Merge pull request #181875 from Artturin/fix-pkg-config-2

main
Artturi 2 years ago committed by GitHub
commit eb15a96f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      pkgs/applications/misc/maliit-framework/default.nix
  2. 7
      pkgs/applications/radio/soapysdr/default.nix
  3. 10
      pkgs/desktops/lxqt/lxqt-build-tools/default.nix
  4. 6
      pkgs/development/compilers/seexpr/default.nix
  5. 9
      pkgs/development/libraries/arrow-cpp/default.nix
  6. 11
      pkgs/development/libraries/audio/libkeyfinder/default.nix
  7. 5
      pkgs/development/libraries/bcg729/default.nix
  8. 7
      pkgs/development/libraries/cglm/default.nix
  9. 6
      pkgs/development/libraries/cm256cc/default.nix
  10. 6
      pkgs/development/libraries/cxxopts/default.nix
  11. 5
      pkgs/development/libraries/drumstick/default.nix
  12. 11
      pkgs/development/libraries/eccodes/default.nix
  13. 6
      pkgs/development/libraries/entt/default.nix
  14. 6
      pkgs/development/libraries/ffmpegthumbnailer/default.nix
  15. 5
      pkgs/development/libraries/gbenchmark/default.nix
  16. 7
      pkgs/development/libraries/getdns/default.nix
  17. 8
      pkgs/development/libraries/google-cloud-cpp/default.nix
  18. 3
      pkgs/development/libraries/gstreamer/bad/default.nix
  19. 7
      pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix
  20. 8
      pkgs/development/libraries/libargs/default.nix
  21. 7
      pkgs/development/libraries/libbtbb/default.nix
  22. 14
      pkgs/development/libraries/libcork/default.nix
  23. 6
      pkgs/development/libraries/libebml/default.nix
  24. 6
      pkgs/development/libraries/libebur128/default.nix
  25. 22
      pkgs/development/libraries/libiio/cmake-fix-libxml2-find-package.patch
  26. 8
      pkgs/development/libraries/libiio/default.nix
  27. 7
      pkgs/development/libraries/libjxl/default.nix
  28. 11
      pkgs/development/libraries/libmatroska/default.nix
  29. 7
      pkgs/development/libraries/libmodule/default.nix
  30. 6
      pkgs/development/libraries/libnats-c/default.nix
  31. 7
      pkgs/development/libraries/libquotient/default.nix
  32. 6
      pkgs/development/libraries/libsurvive/default.nix
  33. 12
      pkgs/development/libraries/libtorrent-rasterbar/default.nix
  34. 7
      pkgs/development/libraries/libtsm/default.nix
  35. 7
      pkgs/development/libraries/libunarr/default.nix
  36. 5
      pkgs/development/libraries/libzra/default.nix
  37. 150
      pkgs/development/libraries/libzra/fix-pkg-config.patch
  38. 25
      pkgs/development/libraries/mysocketw/default.nix
  39. 6
      pkgs/development/libraries/nanomsg/default.nix
  40. 16
      pkgs/development/libraries/notcurses/default.nix
  41. 6
      pkgs/development/libraries/olm/default.nix
  42. 17
      pkgs/development/libraries/openal-soft/default.nix
  43. 7
      pkgs/development/libraries/opencolorio/default.nix
  44. 7
      pkgs/development/libraries/opendht/default.nix
  45. 6
      pkgs/development/libraries/openxr-loader/default.nix
  46. 11
      pkgs/development/libraries/orcania/default.nix
  47. 13
      pkgs/development/libraries/proj/default.nix
  48. 7
      pkgs/development/libraries/rabbitmq-c/default.nix
  49. 5
      pkgs/development/libraries/recastnavigation/default.nix
  50. 10
      pkgs/development/libraries/reproc/default.nix
  51. 7
      pkgs/development/libraries/rinutils/default.nix
  52. 7
      pkgs/development/libraries/rocm-thunk/default.nix
  53. 7
      pkgs/development/libraries/sentencepiece/default.nix
  54. 9
      pkgs/development/libraries/spdlog/default.nix
  55. 6
      pkgs/development/libraries/spirv-headers/default.nix
  56. 10
      pkgs/development/libraries/tdlib/default.nix
  57. 7
      pkgs/development/libraries/tinyobjloader/default.nix
  58. 7
      pkgs/development/libraries/usrsctp/default.nix
  59. 4
      pkgs/development/libraries/wildmidi/default.nix
  60. 6
      pkgs/development/libraries/xsimd/default.nix
  61. 6
      pkgs/development/libraries/xtensor/default.nix
  62. 11
      pkgs/development/libraries/zxing-cpp/default.nix
  63. 15
      pkgs/development/tools/spirv-tools/default.nix
  64. 6
      pkgs/development/web/cog/default.nix
  65. 4
      pkgs/os-specific/linux/bcc/default.nix
  66. 11
      pkgs/os-specific/linux/powercap/default.nix
  67. 7
      pkgs/tools/bluetooth/obexftp/default.nix
  68. 4
      pkgs/tools/bluetooth/openobex/default.nix
  69. 20
      pkgs/tools/networking/shadowsocks-libev/default.nix
  70. 6
      pkgs/tools/package-management/libdnf/default.nix
  71. 10
      pkgs/tools/security/rnp/default.nix

@ -1,6 +1,7 @@
{ mkDerivation
, lib
, fetchFromGitHub
, fetchpatch
, at-spi2-atk
, at-spi2-core
@ -32,6 +33,15 @@ mkDerivation rec {
sha256 = "138jyvw130kmrldksbk4l38gvvahh3x51zi4vyplad0z5nxmbazb";
};
# in master post 2.2.1, see https://github.com/maliit/framework/issues/106
patches = [
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/maliit/framework/commit/1e20a4a5113f1c092295f5a5f04ab6e584f6fcff.patch";
sha256 = "0h7jfqnqvjka626wx2z2g150rch4air7q3zbq59gcb12g7x6gfyn";
})
];
buildInputs = [
at-spi2-atk
at-spi2-core

@ -40,6 +40,13 @@ in stdenv.mkDerivation {
"-DCMAKE_BUILD_TYPE=Release"
] ++ lib.optional usePython "-DUSE_PYTHON_CONFIG=ON";
# https://github.com/pothosware/SoapySDR/issues/352
postPatch = ''
substituteInPlace lib/SoapySDR.in.pc \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
postFixup = lib.optionalString (lib.length extraPackages != 0) ''
# Join all plugins via symlinking
for i in ${toString extraPackages}; do

@ -1,6 +1,7 @@
{ lib
, stdenv
, mkDerivation
, fetchpatch
, fetchFromGitHub
, cmake
, pkg-config
@ -22,6 +23,15 @@ mkDerivation rec {
sha256 = "vzppKTDwADBG5pOaluT858cWCKFFRaSbHz2Qhe6799E=";
};
patches = [
# in master post 0.11.0, see https://github.com/lxqt/lxqt-build-tools/pull/76
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/lxqt/lxqt-build-tools/pull/76/commits/fa9672b671ede3f46b004f81580f9afb50fedf00.patch";
sha256 = "0dl7n1afcc6ky9vd9lpc65p9grpszpql7lfjq2vlzlilixnv8xv1";
})
];
postPatch = ''
# Nix clang on darwin identifies as 'Clang', not 'AppleClang'
# Without this, dependants fail to link.

@ -31,6 +31,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ libGLU libpng zlib qt4 python3Packages.pyqt4 python3Packages.boost bison flex ];
# https://github.com/wdas/SeExpr/issues/106
postPatch = ''
substituteInPlace src/build/seexpr2.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description = "Embeddable expression evaluation engine from Disney Animation";
homepage = "https://wdas.github.io/SeExpr/";

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchurl
, fetchpatch
, fetchFromGitHub
, fixDarwinDylibNames
, abseil-cpp
@ -112,6 +113,14 @@ stdenv.mkDerivation rec {
patches = [
# patch to fix python-test
./darwin.patch
# in master post 8.0.0, see https://github.com/apache/arrow/pull/13182
(fetchpatch {
name = "fix-pkg-config.patch";
stripLen = 1;
excludes = [ "src/arrow/engine/arrow-substrait.pc.in" ]; # for < 8.0.0
url = "https://github.com/apache/arrow/commit/a242eb17362c0352fc3291213542c48abfe18669.patch";
sha256 = "15gz13f8q75l7d4z5blyvxd805hwfcvrbrxs2kbfal9vcbnirycx";
})
];
nativeBuildInputs = [

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, fftw, catch2 }:
{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, fftw, catch2 }:
stdenv.mkDerivation rec {
pname = "libkeyfinder";
@ -11,6 +11,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-7w/Wc9ncLinbnM2q3yv5DBtFoJFAM2e9xAUTsqvE9mg=";
};
# in main post 2.2.6, see https://github.com/mixxxdj/libkeyfinder/issues/21
patches = [
(fetchpatch {
name = "fix-pkg-config";
url = "https://github.com/mixxxdj/libkeyfinder/commit/4e1a5022d4c91e3ecfe9be5c3ac7cc488093bd2e.patch";
sha256 = "08llmgp6r11bq5s820j3fs9bgriaibkhq8r3v2av064w66mwp48x";
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [ fftw ];

@ -18,6 +18,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR}
'';
meta = with lib; {
description = "Opensource implementation of both encoder and decoder of the ITU G729 Annex A/B speech codec";
homepage = "https://linphone.org/technical-corner/bcg729";

@ -17,6 +17,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
# https://github.com/recp/cglm/issues/249
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
meta = with lib; {
homepage = "https://github.com/recp/cglm";
description = "Highly Optimized Graphics Math (glm) for C";

@ -14,6 +14,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ boost ];
# https://github.com/f4exb/cm256cc/issues/16
postPatch = ''
substituteInPlace libcm256cc.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description = "Fast GF(256) Cauchy MDS Block Erasure Codec in C++";
homepage = "https://github.com/f4exb/cm256cc";

@ -31,6 +31,12 @@ stdenv.mkDerivation rec {
# Conflict on case-insensitive filesystems.
dontUseCmakeBuildDir = true;
# https://github.com/jarro2783/cxxopts/issues/332
postPatch = ''
substituteInPlace packaging/pkgconfig.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
homepage = "https://github.com/jarro2783/cxxopts";
description = "Lightweight C++ GNU-style option parser library";

@ -18,6 +18,11 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace library/rt/backendmanager.cpp --subst-var out
# https://sourceforge.net/p/drumstick/bugs/39/
substituteInPlace drumstick-alsa.pc.in drumstick-file.pc.in drumstick-rt.pc.in drumstick-widgets.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
outputs = [ "out" "dev" "man" ];

@ -24,6 +24,17 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace cmake/FindOpenJPEG.cmake --replace openjpeg-2.1 ${openjpeg.incDir}
# https://github.com/ecmwf/ecbuild/issues/40
substituteInPlace cmake/ecbuild_config.h.in \
--replace @CMAKE_INSTALL_PREFIX@/@INSTALL_LIB_DIR@ @eccodes_FULL_INSTALL_LIB_DIR@ \
--replace @CMAKE_INSTALL_PREFIX@/@INSTALL_BIN_DIR@ @eccodes_FULL_INSTALL_BIN_DIR@
substituteInPlace cmake/pkg-config.pc.in \
--replace '$'{prefix}/@INSTALL_LIB_DIR@ @eccodes_FULL_INSTALL_LIB_DIR@ \
--replace '$'{prefix}/@INSTALL_INCLUDE_DIR@ @eccodes_FULL_INSTALL_INCLUDE_DIR@ \
--replace '$'{prefix}/@INSTALL_BIN_DIR@ @eccodes_FULL_INSTALL_BIN_DIR@
substituteInPlace cmake/ecbuild_install_project.cmake \
--replace '$'{CMAKE_INSTALL_PREFIX}/'$'{INSTALL_INCLUDE_DIR} '$'{'$'{PROJECT_NAME}_FULL_INSTALL_INCLUDE_DIR}
'';
nativeBuildInputs = [ cmake gfortran perl ];

@ -12,6 +12,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
# https://github.com/skypjack/entt/issues/890
postPatch = ''
substituteInPlace cmake/in/entt.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
homepage = "https://github.com/skypjack/entt";
description = "A header-only, tiny and easy to use library for game programming and much more written in modern C++";

@ -16,6 +16,12 @@ stdenv.mkDerivation rec {
buildInputs = [ ffmpeg libpng libjpeg ];
cmakeFlags = [ "-DENABLE_THUMBNAILER=ON" ];
# https://github.com/dirkvdb/ffmpegthumbnailer/issues/215
postPatch = ''
substituteInPlace libffmpegthumbnailer.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
homepage = "https://github.com/dirkvdb/ffmpegthumbnailer";
description = "A lightweight video thumbnailer";

@ -16,6 +16,11 @@ stdenv.mkDerivation rec {
postPatch = ''
cp -r ${gtest.src} googletest
chmod -R u+w googletest
# https://github.com/google/benchmark/issues/1396
substituteInPlace cmake/benchmark.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
doCheck = true;

@ -29,6 +29,13 @@ in rec {
buildInputs = [ libidn2 openssl unbound ];
# https://github.com/getdnsapi/getdns/issues/517
postPatch = ''
substituteInPlace getdns.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
postInstall = "rm -r $out/share/doc";
meta = with lib;

@ -42,6 +42,14 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace external/googleapis/CMakeLists.txt \
--replace "https://github.com/googleapis/googleapis/archive/\''${GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}.tar.gz" "file://${googleapis}"
# https://github.com/googleapis/google-cloud-cpp/issues/8992
for file in external/googleapis/config.pc.in google/cloud/{,*/}config.pc.in; do
substituteInPlace "$file" \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_BINDIR@ @CMAKE_INSTALL_FULL_BINDIR@
done
'';
nativeBuildInputs = [

@ -85,6 +85,7 @@
, srt
, vo-aacenc
, libfreeaptx
, zxing-cpp
, VideoToolbox
, AudioToolbox
, AVFoundation
@ -171,6 +172,7 @@ stdenv.mkDerivation rec {
srt
vo-aacenc
libfreeaptx
zxing-cpp
] ++ lib.optionals enableZbar [
zbar
] ++ lib.optionals faacSupport [
@ -259,7 +261,6 @@ stdenv.mkDerivation rec {
"-Dwasapi=disabled" # not packaged in nixpkgs as of writing / no Windows support
"-Dwasapi2=disabled" # not packaged in nixpkgs as of writing / no Windows support
"-Dwpe=disabled" # required `wpe-webkit` library not packaged in nixpkgs as of writing
"-Dzxing=disabled" # required `zxing-cpp` library not packaged in nixpkgs as of writing
"-Disac=disabled" # depends on `webrtc-audio-coding-1` not compatible with 0.3
"-Dgs=disabled" # depends on `google-cloud-cpp`
"-Donnx=disabled" # depends on `libonnxruntime` not packaged in nixpkgs as of writing

@ -1,10 +1,15 @@
{ mkDerivation, lib, cmake, pkg-config }:
{ mkDerivation, lib, fetchpatch, cmake, pkg-config }:
mkDerivation {
pname = "extra-cmake-modules";
patches = [
./nix-lib-path.patch
# https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/268
(fetchpatch {
url = "https://invent.kde.org/frameworks/extra-cmake-modules/-/commit/5862a6f5b5cd7ed5a7ce2af01e44747c36318220.patch";
sha256 = "10y36fc3hnpmcsmjgfxn1rp4chj5yrhgghj7m8gbmcai1q5jr0xj";
})
];
outputs = [ "out" ]; # this package has no runtime components

@ -13,6 +13,14 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
# https://github.com/Taywee/args/issues/108
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR}
substituteInPlace packaging/pkgconfig.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
description = "A simple header-only C++ argument parser library";
homepage = "https://github.com/Taywee/args";

@ -13,6 +13,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.isDarwin [ CoreServices ];
# https://github.com/greatscottgadgets/libbtbb/issues/63
postPatch = ''
substituteInPlace lib/libbtbb.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
description = "Bluetooth baseband decoding library";
homepage = "https://github.com/greatscottgadgets/libbtbb";

@ -16,14 +16,20 @@ stdenv.mkDerivation rec {
sha256 = "152gqnmr6wfmflf5l6447am4clmg3p69pvy3iw7yhaawjqa797sk";
};
# N.B. We need to create this file, otherwise it tries to use git to
# determine the package version, which we do not want.
#
# N.B. We disable tests by force, since their build is broken.
postPatch = ''
# N.B. We need to create this file, otherwise it tries to use git to
# determine the package version, which we do not want.
echo "${version}" > .version-stamp
echo "${version}" > .commit-stamp
# N.B. We disable tests by force, since their build is broken.
sed -i '/add_subdirectory(tests)/d' ./CMakeLists.txt
# https://github.com/dcreager/libcork/issues/173
substituteInPlace cmake/FindCTargets.cmake \
--replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR} \
--replace '\$'{datarootdir}/'$'{base_docdir} '$'{CMAKE_INSTALL_FULL_DOCDIR}
'';
nativeBuildInputs = [ cmake pkg-config ];

@ -18,6 +18,12 @@ stdenv.mkDerivation rec {
sha256 = "1yd6rsds03kwx5jki4hihd2bpfh26g5l1pi82qzaqzarixdxwzvl";
excludes = [ "ChangeLog" ];
})
# in master post 1.4.2, see https://github.com/Matroska-Org/libebml/issues/97
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/Matroska-Org/libebml/commit/42fbae35d291b737f2bb4ad5d643fd0d48537a88.patch";
sha256 = "020qp4a3l60mcm4n310ynxbbv5qlpmybb9xy10pjvx4brp83pmy3";
})
];
nativeBuildInputs = [ cmake pkg-config ];

@ -14,6 +14,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ speexdsp ];
# https://github.com/jiixyj/libebur128/issues/121
postPatch = ''
substituteInPlace ebur128/libebur128.pc.cmake \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description = "Implementation of the EBU R128 loudness standard";
homepage = "https://github.com/jiixyj/libebur128";

@ -1,13 +1,13 @@
diff --color -ur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2021-05-30 13:46:22.256040282 +0200
+++ b/CMakeLists.txt 2021-05-30 14:15:42.530181216 +0200
@@ -333,7 +333,7 @@
# So, try first to find the CMake module provided by libxml2 package, then fallback
# on the CMake's FindLibXml2.cmake module (which can lack some definition, especially
# in static build case).
-find_package(LibXml2 QUIET NO_MODULE)
+find_package(LibXml2 QUIET MODULE)
if(DEFINED LIBXML2_VERSION_STRING)
set(LIBXML2_FOUND ON)
set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS})
--- a/CMakeLists.txt 2022-06-02 02:57:01.503340155 +0300
+++ b/CMakeLists.txt 2022-06-02 02:54:33.726941188 +0300
@@ -378,7 +378,7 @@
# So, try first to find the CMake module provided by libxml2 package, then fallback
# on the CMake's FindLibXml2.cmake module (which can lack some definition, especially
# in static build case).
- find_package(LibXml2 QUIET NO_MODULE)
+ find_package(LibXml2 QUIET MODULE)
if(DEFINED LIBXML2_VERSION_STRING)
set(LIBXML2_FOUND ON)
set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS})
Seulement dans b: good.patch

@ -6,13 +6,15 @@
, libxml2
, python
, libusb1
, avahi
, libaio
, runtimeShell
, lib
}:
stdenv.mkDerivation rec {
pname = "libiio";
version = "0.21";
version = "0.23";
outputs = [ "out" "lib" "dev" "python" ];
@ -20,7 +22,7 @@ stdenv.mkDerivation rec {
owner = "analogdevicesinc";
repo = "libiio";
rev = "v${version}";
sha256 = "0psw67mzysdb8fkh8xpcwicm7z94k8plkcc8ymxyvl6inshq0mc7";
sha256 = "0awny9zb43dcnxa5jpxay2zxswydblnbn4x6vi5mlw1r48pzhjf8";
};
# Revert after https://github.com/NixOS/nixpkgs/issues/125008 is
@ -37,6 +39,8 @@ stdenv.mkDerivation rec {
python
libxml2
libusb1
avahi
libaio
] ++ lib.optional python.isPy3k python.pkgs.setuptools;
cmakeFlags = [

@ -35,6 +35,13 @@ stdenv.mkDerivation rec {
};
patches = [
# present in master, see https://github.com/libjxl/libjxl/pull/1403
(fetchpatch {
name = "prefixless-pkg-config.patch";
url = "https://github.com/libjxl/libjxl/commit/0b906564bfbfd8507d61c5d6a447f545f893227c.patch";
sha256 = "1g5c6lrsmgxb9j64pjy8lbdgbvw834m5jyfivy9ppmd8iiv0kkq4";
})
# present in master, remove after 0.7?
(fetchpatch {
name = "fix-link-lld-macho.patch";

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config
, libebml }:
stdenv.mkDerivation rec {
@ -12,6 +12,15 @@ stdenv.mkDerivation rec {
sha256 = "01dg12ndxfdqgjx5v2qy4mff6xjdxglywyg82sr3if5aw6rp3dji";
};
# in master post 1.6.3, see https://github.com/Matroska-Org/libmatroska/issues/62
patches = [
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/Matroska-Org/libmatroska/commit/53f6ea573878621871bca5f089220229fcb33a3b.patch";
sha256 = "1lcxl3n32kk5x4aa4ja7p68km7qb2bwscavpv7qdmbhp3w5ia0mk";
})
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libebml ];

@ -17,6 +17,13 @@ stdenv.mkDerivation rec {
pkg-config
];
# https://github.com/FedeDP/libmodule/issues/7
postPatch = ''
substituteInPlace Extra/libmodule.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
description = "C simple and elegant implementation of an actor library";
homepage = "https://github.com/FedeDP/libmodule";

@ -20,6 +20,12 @@ stdenv.mkDerivation rec {
separateDebugInfo = true;
outputs = [ "out" "dev" ];
# https://github.com/nats-io/nats.c/issues/542
postPatch = ''
substituteInPlace src/libnats.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description = "C API for the NATS messaging system";
homepage = "https://github.com/nats-io/nats.c";

@ -20,6 +20,13 @@ mkDerivation rec {
"-DQuotient_ENABLE_E2EE=OFF"
];
# https://github.com/quotient-im/libQuotient/issues/551
postPatch = ''
substituteInPlace Quotient.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
description = "A Qt5 library to write cross-platform clients for Matrix";
homepage = "https://matrix.org/docs/projects/sdk/quotient";

@ -34,6 +34,12 @@ stdenv.mkDerivation rec {
eigen
];
# https://github.com/cntools/libsurvive/issues/272
postPatch = ''
substituteInPlace survive.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description = "Open Source Lighthouse Tracking System";
homepage = "https://github.com/cntools/libsurvive";

@ -25,6 +25,18 @@ in stdenv.mkDerivation {
buildInputs = [ boostPython openssl zlib python ncurses ]
++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
# https://github.com/arvidn/libtorrent/issues/6865
postPatch = ''
substituteInPlace cmake/Modules/GeneratePkgConfig.cmake \
--replace @CMAKE_INSTALL_PREFIX@/'$<'1: '$<'1:
substituteInPlace cmake/Modules/GeneratePkgConfig/target-compile-settings.cmake.in \
--replace 'set(_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@")' \
'set(_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@")
set(_INSTALL_FULL_LIBDIR "@CMAKE_INSTALL_FULL_LIBDIR@")'
substituteInPlace cmake/Modules/GeneratePkgConfig/pkg-config.cmake.in \
--replace '$'{prefix}/@_INSTALL_LIBDIR@ @_INSTALL_FULL_LIBDIR@
'';
postInstall = ''
moveToOutput "include" "$dev"
moveToOutput "lib/${python.libPrefix}" "$python"

@ -15,6 +15,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkg-config ];
# https://github.com/Aetf/libtsm/issues/20
postPatch = ''
substituteInPlace etc/libtsm.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
description = "Terminal-emulator State Machine";
homepage = "http://www.freedesktop.org/wiki/Software/kmscon/libtsm/";

@ -11,6 +11,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
# https://github.com/selmf/unarr/issues/23
postPatch = ''
substituteInPlace pkg-config.pc.cmake \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
homepage = "https://github.com/selmf/unarr";
description = "A lightweight decompression library with support for rar, tar and zip archives";

@ -17,6 +17,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
# in submodule dev as of 1.4.7
postPatch = ''
(cd submodule/zstd && patch -Np1 < ${./fix-pkg-config.patch})
'';
meta = with lib; {
homepage = "https://github.com/zraorg/ZRA";
description = "Library for ZStandard random access";

@ -0,0 +1,150 @@
From 7be7e35d61d8d499599623502a35460d410de114 Mon Sep 17 00:00:00 2001
From: Alexander Shpilkin <ashpilkin@gmail.com>
Date: Thu, 26 May 2022 16:03:27 +0300
Subject: [PATCH] Squashed commit of the following:
commit 9aacb9d5da65a64c3845937a6f9eede329d43989
Author: W. Felix Handte <w@felixhandte.com>
Date: Tue Dec 8 20:46:02 2020 -0500
Apply Same Strategy to CMake
(cherry picked from commit a75f9ce3e924564ab358c2c1aa95b6268383ec42)
commit e21b7ad0d98d1322ea92f99fcd1f85e2d6b6f6b7
Author: W. Felix Handte <w@felixhandte.com>
Date: Tue Dec 8 20:10:05 2020 -0500
Avoid Use of Regexes in Building Package-Config File
(cherry picked from commit b521183c74795bd9bdd9bdebe74af01cae4d3d43)
---
build/cmake/lib/CMakeLists.txt | 29 ++++++++++++++++++++++++----
lib/Makefile | 35 ++++++++++++++++------------------
lib/libzstd.pc.in | 6 +++---
3 files changed, 44 insertions(+), 26 deletions(-)
diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt
index 32ae7525..466c2c7b 100644
--- a/build/cmake/lib/CMakeLists.txt
+++ b/build/cmake/lib/CMakeLists.txt
@@ -137,12 +137,33 @@ endif ()
if (UNIX)
# pkg-config
set(PREFIX "${CMAKE_INSTALL_PREFIX}")
- set(LIBDIR "${CMAKE_INSTALL_LIBDIR}")
- set(INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
+ set(EXEC_PREFIX "\\$$\{prefix}")
+ set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
+ set(INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
set(VERSION "${zstd_VERSION}")
+
+ string(LENGTH "${PREFIX}" PREFIX_LENGTH)
+ string(SUBSTRING "${LIBDIR}" 0 ${PREFIX_LENGTH} LIBDIR_PREFIX)
+ string(SUBSTRING "${LIBDIR}" ${PREFIX_LENGTH} -1 LIBDIR_SUFFIX)
+ string(SUBSTRING "${INCLUDEDIR}" 0 ${PREFIX_LENGTH} INCLUDEDIR_PREFIX)
+ string(SUBSTRING "${INCLUDEDIR}" ${PREFIX_LENGTH} -1 INCLUDEDIR_SUFFIX)
+
+ if ("${INCLUDEDIR_PREFIX}" STREQUAL "${PREFIX}")
+ set(INCLUDEDIR_PREFIX "\\$$\{prefix}")
+ endif()
+ if ("${LIBDIR_PREFIX}" STREQUAL "${PREFIX}")
+ set(LIBDIR_PREFIX "\\$$\{exec_prefix}")
+ endif()
+
add_custom_target(libzstd.pc ALL
- ${CMAKE_COMMAND} -DIN="${LIBRARY_DIR}/libzstd.pc.in" -DOUT="libzstd.pc"
- -DPREFIX="${PREFIX}" -DLIBDIR="${LIBDIR}" -DINCLUDEDIR="${INCLUDEDIR}" -DVERSION="${VERSION}"
+ ${CMAKE_COMMAND}
+ -DIN="${LIBRARY_DIR}/libzstd.pc.in"
+ -DOUT="libzstd.pc"
+ -DPREFIX="${PREFIX}"
+ -DEXEC_PREFIX="${EXEC_PREFIX}"
+ -DINCLUDEDIR="${INCLUDEDIR_PREFIX}${INCLUDEDIR_SUFFIX}"
+ -DLIBDIR="${LIBDIR_PREFIX}${LIBDIR_SUFFIX}"
+ -DVERSION="${VERSION}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig.cmake"
COMMENT "Creating pkg-config file")
diff --git a/lib/Makefile b/lib/Makefile
index 4a9ab799..2893ec21 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -257,6 +257,8 @@ ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD Ne
all: libzstd.pc
+HAS_EXPLICIT_EXEC_PREFIX := $(if $(or $(EXEC_PREFIX),$(exec_prefix)),1,)
+
DESTDIR ?=
# directory variables : GNU conventions prefer lowercase
# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
@@ -270,24 +272,17 @@ LIBDIR ?= $(libdir)
includedir ?= $(PREFIX)/include
INCLUDEDIR ?= $(includedir)
-PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n $(SED_ERE_OPT) -e "s@^$(EXEC_PREFIX)(/|$$)@@p")
-PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n $(SED_ERE_OPT) -e "s@^$(PREFIX)(/|$$)@@p")
+PCINCDIR := $(patsubst $(PREFIX)%,%,$(INCLUDEDIR))
+PCLIBDIR := $(patsubst $(EXEC_PREFIX)%,%,$(LIBDIR))
-ifeq (,$(PCLIBDIR))
-# Additional prefix check is required, since the empty string is technically a
-# valid PCLIBDIR
-ifeq (,$(shell echo "$(LIBDIR)" | sed -n $(SED_ERE_OPT) -e "\\@^$(EXEC_PREFIX)(/|$$)@ p"))
-$(error configured libdir ($(LIBDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file)
-endif
-endif
+# If we successfully stripped off a prefix, we'll add a reference to the
+# relevant pc variable.
+PCINCPREFIX := $(if $(findstring $(INCLUDEDIR),$(PCINCDIR)),,$${prefix})
+PCLIBPREFIX := $(if $(findstring $(LIBDIR),$(PCLIBDIR)),,$${exec_prefix})
-ifeq (,$(PCINCDIR))
-# Additional prefix check is required, since the empty string is technically a
-# valid PCINCDIR
-ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n $(SED_ERE_OPT) -e "\\@^$(PREFIX)(/|$$)@ p"))
-$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file)
-endif
-endif
+# If no explicit EXEC_PREFIX was set by the caller, write it out as a reference
+# to PREFIX, rather than as a resolved value.
+PCEXEC_PREFIX := $(if $(HAS_EXPLICIT_EXEC_PREFIX),$(EXEC_PREFIX),$${prefix})
ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly))
PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig
@@ -308,9 +303,11 @@ INSTALL_DATA ?= $(INSTALL) -m 644
libzstd.pc:
libzstd.pc: libzstd.pc.in
@echo creating pkgconfig
- $(Q)@sed $(SED_ERE_OPT) -e 's|@PREFIX@|$(PREFIX)|' \
- -e 's|@LIBDIR@|$(PCLIBDIR)|' \
- -e 's|@INCLUDEDIR@|$(PCINCDIR)|' \
+ $(Q)@sed $(SED_ERE_OPT) \
+ -e 's|@PREFIX@|$(PREFIX)|' \
+ -e 's|@EXEC_PREFIX@|$(PCEXEC_PREFIX)|' \
+ -e 's|@INCLUDEDIR@|$(PCINCPREFIX)$(PCINCDIR)|' \
+ -e 's|@LIBDIR@|$(PCLIBPREFIX)$(PCLIBDIR)|' \
-e 's|@VERSION@|$(VERSION)|' \
$< >$@
diff --git a/lib/libzstd.pc.in b/lib/libzstd.pc.in
index 8ec0235a..8465c977 100644
--- a/lib/libzstd.pc.in
+++ b/lib/libzstd.pc.in
@@ -3,9 +3,9 @@
# BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
prefix=@PREFIX@
-exec_prefix=${prefix}
-includedir=${prefix}/@INCLUDEDIR@
-libdir=${exec_prefix}/@LIBDIR@
+exec_prefix=@EXEC_PREFIX@
+includedir=@INCLUDEDIR@
+libdir=@LIBDIR@
Name: zstd
Description: fast lossless compression algorithm library
--
2.36.0

@ -1,10 +1,20 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, fetchurl
, openssl
, cmake
}:
let
joinpaths-src = fetchurl {
url = "https://github.com/AnotherFoxGuy/CMakeCM/raw/afe41f4536ae21f6f11f83e8c0b8b8c450ef1332/modules/JoinPaths.cmake";
hash = "sha256-eUsNj6YqO3mMffEtUBFFgNGkeiNL+2tNgwkutkam7MQ=";
};
in
stdenv.mkDerivation rec {
pname = "mysocketw";
version = "3.11.0";
@ -16,6 +26,15 @@ stdenv.mkDerivation rec {
hash = "sha256-mpfhmKE2l59BllkOjmURIfl17lAakXpmGh2x9SFSaAo=";
};
patches = [
# in master post 3.11.0, see https://github.com/RigsOfRods/socketw/issues/16
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/RigsOfRods/socketw/commit/17cad062c3673bd0da74a2fecadb01dbf9813a07.patch";
sha256 = "01b019gfm01g0r1548cizrf7mqigsda8jnrzhg8dhi9c49nfw1bp";
})
];
nativeBuildInputs = [
cmake
];
@ -24,6 +43,12 @@ stdenv.mkDerivation rec {
openssl
];
postUnpack = ''(
mkdir -p source/build/_cmcm-modules/resolved && cd $_
cp ${joinpaths-src} JoinPaths.cmake
printf %s 'https://AnotherFoxGuy.com/CMakeCM::modules/JoinPaths.cmake.1' > JoinPaths.cmake.whence
)'';
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace src/Makefile \
--replace -Wl,-soname, -Wl,-install_name,$out/lib/

@ -21,6 +21,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
# https://github.com/nanomsg/nanomsg/issues/1082
postPatch = ''
substituteInPlace src/pkgconfig.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description= "Socket library that provides several common communication patterns";
homepage = "https://nanomsg.org/";

@ -44,6 +44,22 @@ stdenv.mkDerivation rec {
lib.optional (qrcodegenSupport) "-DUSE_QRCODEGEN=ON"
++ lib.optional (!multimediaSupport) "-DUSE_MULTIMEDIA=none";
# https://github.com/dankamongmen/notcurses/issues/2661
postPatch = ''
substituteInPlace tools/notcurses-core.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace tools/notcurses-ffi.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace tools/notcurses++.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace tools/notcurses.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
homepage = "https://github.com/dankamongmen/notcurses";
description = "Blingful TUIs and character graphics";

@ -16,6 +16,12 @@ stdenv.mkDerivation rec {
doCheck = true;
postPatch = ''
substituteInPlace olm.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
description = "Implements double cryptographic ratchet and Megolm ratchet";
homepage = "https://gitlab.matrix.org/matrix-org/olm";

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config
, alsaSupport ? !stdenv.isDarwin, alsa-lib
, dbusSupport ? !stdenv.isDarwin, dbus
, pipewireSupport ? !stdenv.isDarwin, pipewire
@ -17,9 +17,16 @@ stdenv.mkDerivation rec {
sha256 = "sha256-MVM0qCZDWcO7/Hnco+0dBqzBLcWD279xjx0slxxlc4w=";
};
# this will make it find its own data files (e.g. HRTF profiles)
# without any other configuration
patches = [ ./search-out.patch ];
patches = [
# this will make it find its own data files (e.g. HRTF profiles)
# without any other configuration
./search-out.patch
# merged after 1.22.0 in https://github.com/kcat/openal-soft/pull/696
(fetchpatch {
url = "https://github.com/kcat/openal-soft/commit/0bf2abae9b2121c3bc5a56dab30eca308136bc29.patch";
sha256 = "1fhjjy7nrhrj3a0wlmsqpf8h3ss6s487vz5jrhamyv04nbcahn20";
})
];
postPatch = ''
substituteInPlace core/helpers.cpp \
--replace "@OUT@" $out
@ -46,7 +53,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "OpenAL alternative";
homepage = "https://kcat.strangesoft.net/openal.html";
homepage = "https://openal-soft.org/";
license = licenses.lgpl2;
maintainers = with maintainers; [ftrvxmtrx];
platforms = platforms.unix;

@ -55,6 +55,13 @@ stdenv.mkDerivation rec {
# TODO Investigate this: Python and GPU tests fail to load libOpenColorIO.so.2.0
# doCheck = true;
# https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1649
postPatch = ''
substituteInPlace src/OpenColorIO/CMakeLists.txt \
--replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR} \
--replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR}
'';
meta = with lib; {
homepage = "https://opencolorio.org";
description = "A color management framework for visual effects and animation";

@ -59,6 +59,13 @@ stdenv.mkDerivation rec {
"-DOPENDHT_PUSH_NOTIFICATIONS=ON"
];
# https://github.com/savoirfairelinux/opendht/issues/612
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
outputs = [ "out" "lib" "dev" "man" ];
meta = with lib; {

@ -18,6 +18,12 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "layers" ];
# https://github.com/KhronosGroup/OpenXR-SDK-Source/issues/305
postPatch = ''
substituteInPlace src/loader/openxr.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
postInstall = ''
mkdir -p "$layers/share"
mv "$out/share/openxr" "$layers/share"

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, check, subunit }:
{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, check, subunit }:
stdenv.mkDerivation rec {
pname = "orcania";
version = "2.3.0";
@ -10,6 +10,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-QAq/6MGVj+iBHLElHuqokF1v3LU1TZ9hVVJE1s3y6f0=";
};
# in master post 2.2.2, see https://github.com/babelouest/orcania/issues/27
patches = [
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/babelouest/orcania/commit/4eac7d5ff76bb3bec8250fef300b723c8891552a.patch";
sha256 = "01bsxay1ca8d08ac3ddcqyvjwgz5mgs68jz5y3gzq4qnzl3q1i54";
})
];
nativeBuildInputs = [ cmake ];
checkInputs = [ check subunit ];

@ -22,6 +22,19 @@ stdenv.mkDerivation rec {
sha256 = "sha256-zMP+WzC65BFz8g8mF5t7toqxmxCJePysd6WJuqpe8yg=";
};
# https://github.com/OSGeo/PROJ/issues/3206
postPatch = ''
# NB will not apply once https://github.com/OSGeo/PROJ/pull/3150 is released
substituteInPlace cmake/ProjUtilities.cmake \
--replace '$\{exec_prefix\}/$'{PROJ_LIB_SUBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '$\{prefix\}/$'{PROJ_INCLUDE_SUBDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR} \
--replace '$\{prefix\}/$'{CMAKE_INSTALL_DATAROOTDIR} '$'{CMAKE_INSTALL_FULL_DATAROOTDIR}
substituteInPlace cmake/project-config.cmake.in \
--replace '$'{_ROOT}/@INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ \
--replace '$'{_ROOT}/@LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{_ROOT}/@BINDIR@ @CMAKE_INSTALL_FULL_BINDIR@
'';
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake pkg-config ];

@ -14,6 +14,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ openssl popt xmlto ];
# https://github.com/alanxz/rabbitmq-c/issues/733
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
meta = with lib; {
description = "RabbitMQ C AMQP client library";
homepage = "https://github.com/alanxz/rabbitmq-c";

@ -15,6 +15,11 @@ stdenv.mkDerivation rec {
postPatch = ''
cp ${catch}/include/catch/catch.hpp Tests/catch.hpp
# https://github.com/recastnavigation/recastnavigation/issues/524
substituteInPlace CMakeLists.txt \
--replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
doCheck = true;

@ -22,6 +22,16 @@ stdenv.mkDerivation rec {
"-DREPROC_TEST=ON"
];
# https://github.com/DaanDeMeyer/reproc/issues/81
postPatch = ''
substituteInPlace reproc++/reproc++.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace reproc/reproc.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
homepage = "https://github.com/DaanDeMeyer/reproc";
description = "A cross-platform (C99/C++11) process library";

@ -18,4 +18,11 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cmake perl ];
# https://github.com/shlomif/rinutils/issues/5
# (variable was unused at time of writing)
postPatch = ''
substituteInPlace librinutils.pc.in \
--replace '$'{exec_prefix}/@RINUTILS_INSTALL_MYLIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
}

@ -26,6 +26,13 @@ stdenv.mkDerivation rec {
buildInputs = [ libdrm numactl ];
# https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/issues/75
postPatch = ''
substituteInPlace libhsakmt.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
postInstall = ''
cp -r $src/include $out
'';

@ -24,6 +24,13 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" ];
# https://github.com/google/sentencepiece/issues/754
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
meta = with lib; {
homepage = "https://github.com/google/sentencepiece";
description = "Unsupervised text tokenizer for Neural Network-based text generation";

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, fmt_8
{ lib, stdenv, fetchFromGitHub, cmake, fmt_8, fetchpatch
, staticBuild ? stdenv.hostPlatform.isStatic
}:
@ -15,6 +15,13 @@ let
inherit sha256;
};
# in master post 1.10.0, see https://github.com/gabime/spdlog/issues/2380
patches = lib.optional (lib.versionAtLeast version "1.4.1") (fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/gabime/spdlog/commit/afb69071d5346b84e38fbcb0c8c32eddfef02a55.patch";
sha256 = "0cab2bbv8zyfhrhfvcyfwf5p2fddlq5hs2maampn5w18f6jhvk6q";
});
nativeBuildInputs = [ cmake ];
# spdlog <1.3 uses a bundled version of fmt
propagatedBuildInputs = lib.optional (lib.versionAtLeast version "1.3") fmt_8;

@ -13,6 +13,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
# https://github.com/KhronosGroup/SPIRV-Headers/issues/282
postPatch = ''
substituteInPlace SPIRV-Headers.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "Machine-readable components of the Khronos SPIR-V Registry";

@ -15,6 +15,16 @@ stdenv.mkDerivation rec {
buildInputs = [ gperf openssl readline zlib ];
nativeBuildInputs = [ cmake ];
# https://github.com/tdlib/td/issues/1974
postPatch = ''
substituteInPlace CMake/GeneratePkgConfig.cmake \
--replace 'function(generate_pkgconfig' \
'include(GNUInstallDirs)
function(generate_pkgconfig' \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
meta = with lib; {
description = "Cross-platform library for building Telegram clients";
homepage = "https://core.telegram.org/tdlib/";

@ -16,6 +16,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
# https://github.com/tinyobjloader/tinyobjloader/issues/336
postPatch = ''
substituteInPlace tinyobjloader.pc.in \
--replace '$'{prefix}/@TINYOBJLOADER_LIBRARY_DIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@TINYOBJLOADER_INCLUDE_DIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
homepage = "https://github.com/tinyobjloader/tinyobjloader";
description = "Tiny but powerful single file wavefront obj loader";

@ -13,6 +13,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
# https://github.com/sctplab/usrsctp/issues/662
postPatch = ''
substituteInPlace usrsctplib/CMakeLists.txt \
--replace '$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
meta = with lib; {
homepage = "https://github.com/sctplab/usrsctp";
description = "A portable SCTP userland stack";

@ -18,6 +18,10 @@ stdenv.mkDerivation rec {
preConfigure = ''
substituteInPlace CMakeLists.txt \
--replace /etc/wildmidi $out/etc
# https://github.com/Mindwerks/wildmidi/issues/236
substituteInPlace src/wildmidi.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
postInstall = ''

@ -25,6 +25,12 @@ stdenv.mkDerivation rec {
in
"-${builtins.concatStringsSep ":" filteredTests}";
# https://github.com/xtensor-stack/xsimd/issues/748
postPatch = ''
substituteInPlace xsimd.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description = "C++ wrappers for SIMD intrinsics";
homepage = "https://github.com/xtensor-stack/xsimd";

@ -26,6 +26,12 @@ stdenv.mkDerivation rec {
checkInputs = [ gtest ];
checkTarget = "xtest";
# https://github.com/xtensor-stack/xtensor/issues/2542
postPatch = ''
substituteInPlace xtensor.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description = "Multi-dimensional arrays with broadcasting and lazy computing.";
homepage = "https://github.com/xtensor-stack/xtensor";

@ -26,6 +26,17 @@ stdenv.mkDerivation rec {
"-DBUILD_BLACKBOX_TESTS=OFF"
];
# https://github.com/nu-book/zxing-cpp/issues/335
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace 'configure_file(zxing.pc.in' \
'include(GNUInstallDirs)
configure_file(zxing.pc.in'
substituteInPlace zxing.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
homepage = "https://github.com/nu-book/zxing-cpp";
description = "C++ port of zxing (a Java barcode image processing library)";

@ -17,6 +17,21 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ];
# https://github.com/KhronosGroup/SPIRV-Tools/issues/3905
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '-P ''${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake' \
'-DCMAKE_INSTALL_FULL_LIBDIR=''${CMAKE_INSTALL_FULL_LIBDIR}
-DCMAKE_INSTALL_FULL_INCLUDEDIR=''${CMAKE_INSTALL_FULL_INCLUDEDIR}
-P ''${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake'
substituteInPlace cmake/SPIRV-Tools.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace cmake/SPIRV-Tools-shared.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "The SPIR-V Tools project provides an API and commands for processing SPIR-V modules";

@ -53,6 +53,12 @@ stdenv.mkDerivation rec {
"-DCOG_USE_WEBKITGTK=ON"
];
# https://github.com/Igalia/cog/issues/438
postPatch = ''
substituteInPlace core/cogcore.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
# not ideal, see https://github.com/WebPlatformForEmbedded/libwpe/issues/59
preFixup = ''
wrapProgram $out/bin/cog \

@ -52,6 +52,10 @@ python.pkgs.buildPythonApplication rec {
substituteAll ${./absolute-ausyscall.patch} ./absolute-ausyscall.patch
patch -p1 < absolute-ausyscall.patch
# https://github.com/iovisor/bcc/issues/3996
substituteInPlace src/cc/libbcc.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
postInstall = ''

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
stdenv.mkDerivation rec {
pname = "powercap";
@ -11,6 +11,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-l+IpFqBnCYUU825++sUPySD/Ku0TEIX2kt+S0Wml6iA=";
};
# in master post 0.6.0, see https://github.com/powercap/powercap/issues/8
patches = [
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/powercap/powercap/commit/278dceb51635686e343edfc357b6020533fff299.patch";
sha256 = "0h62j63xdn0iqyx4xbia6hlmdjn45camb82z4vv6sb37x9sph7rg";
})
];
nativeBuildInputs = [ cmake ];
cmakeFlags = [

@ -15,6 +15,13 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ openobex ];
# https://sourceforge.net/p/openobex/bugs/66/
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
# There's no such thing like "bluetooth" library; possibly they meant "bluez" but it links correctly without this.
postFixup = ''
sed -i 's,^Requires: bluetooth,Requires:,' $out/lib/pkgconfig/obexftp.pc

@ -17,6 +17,10 @@ stdenv.mkDerivation rec {
patchPhase = ''
sed -i "s!/lib/udev!$out/lib/udev!" udev/CMakeLists.txt
sed -i "/if ( PKGCONFIG_UDEV_FOUND )/,/endif ( PKGCONFIG_UDEV_FOUND )/d" udev/CMakeLists.txt
# https://sourceforge.net/p/openobex/bugs/66/
substituteInPlace CMakeLists.txt \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
meta = with lib; {

@ -25,6 +25,26 @@ stdenv.mkDerivation rec {
"-DCMAKE_SKIP_BUILD_RPATH=ON"
];
postPatch = ''
# https://github.com/shadowsocks/shadowsocks-libev/issues/2901
substituteInPlace CMakeLists.txt \
--replace '# pkg-config' \
'# pkg-config
include(GNUInstallDirs)'
substituteInPlace cmake/shadowsocks-libev.pc.cmake \
--replace @prefix@ @CMAKE_INSTALL_PREFIX@ \
--replace '$'{prefix}/@CMAKE_INSTALL_BINDIR@ @CMAKE_INSTALL_FULL_BINDIR@ \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_FULL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_DATAROOTDIR@ @CMAKE_INSTALL_FULL_DATAROOTDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_MANDIR@ @CMAKE_INSTALL_FULL_MANDIR@
# https://github.com/dcreager/libcork/issues/173 but needs a different patch (yay vendoring)
substituteInPlace libcork/src/libcork.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
postInstall = ''
cp lib/* $out/lib
'';

@ -41,11 +41,15 @@ stdenv.mkDerivation rec {
cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake cmake/modules/
'';
# See https://github.com/NixOS/nixpkgs/issues/107428
postPatch = ''
# See https://github.com/NixOS/nixpkgs/issues/107428
substituteInPlace CMakeLists.txt \
--replace "enable_testing()" "" \
--replace "add_subdirectory(tests)" ""
# https://github.com/rpm-software-management/libdnf/issues/1518
substituteInPlace libdnf/libdnf.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
cmakeFlags = [

@ -5,6 +5,7 @@
, bzip2
, cmake
, fetchFromGitHub
, fetchpatch
, gnupg
, gtest
, json_c
@ -24,6 +25,15 @@ stdenv.mkDerivation rec {
sha256 = "u0etVslTBF9fBqnpVBofYsm0uC/eR6gO3lhwzqua5Qw=";
};
# in master post 0.16.0, see https://github.com/rnpgp/rnp/issues/1835
patches = [
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/rnpgp/rnp/commit/de9856c94ea829cad277800ee03ec52e30993d8e.patch";
sha256 = "1vd83fva7lhmvqnvsrifqb2zdhfrbx84lf3l9i0hcph0k8h3ddx9";
})
];
buildInputs = [ zlib bzip2 json_c botan2 ];
cmakeFlags = [

Loading…
Cancel
Save