Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken CMake-generated pkg-config files #172150

Closed
wants to merge 99 commits into from
Closed
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
9c6f916
zxing: fix paths in pkg-config file
alexshpilkin May 9, 2022
fbd1b02
gst_all_1.gst-plugins-bad: link with zxing-cpp
alexshpilkin May 9, 2022
0764de0
spirv-tools: fix paths in pkg-config files
alexshpilkin May 9, 2022
5673ca3
libjxl: fix paths in pkg-config files
alexshpilkin May 9, 2022
a6d70f7
wildmidi: fix paths in pkg-config file
alexshpilkin May 9, 2022
eeb7354
usrsctp: fix paths in pkg-config file
alexshpilkin May 9, 2022
e867c55
openalSoft: update homepage URL
alexshpilkin May 9, 2022
2fbfcad
openalSoft: fix paths in pkg-config file
alexshpilkin May 9, 2022
62011ff
libebur128: fix paths in pkg-config file
alexshpilkin May 9, 2022
25ec748
openobex: fix paths in pkg-config file
alexshpilkin May 9, 2022
d7923ae
ffmpegthumbnailer: fix path in pkg-config file
alexshpilkin May 9, 2022
45e0d3c
libmatroska: fix paths in pkg-config file
alexshpilkin May 9, 2022
ad65ea0
extra-cmake-modules: fix paths in generated pkg-config files
alexshpilkin May 9, 2022
3fdaf9f
libebml: fix paths in pkg-config file
alexshpilkin May 9, 2022
f9328d8
fixup 5673ca3bc6d use upstream fix
alexshpilkin May 13, 2022
fb9aa5e
libargs: fix path in pkg-config file
alexshpilkin May 13, 2022
76e5d0c
arrow-cpp: fix paths in CMake and pkg-config files
alexshpilkin May 16, 2022
d01ac37
bcc: fix path in pkg-config file
alexshpilkin May 16, 2022
91b6833
bcg729: fix path in pkg-config file
alexshpilkin May 16, 2022
f23a7bc
cglm: fix paths in pkg-config file
alexshpilkin May 16, 2022
852a7e2
cm256cc: fix path in pkg-config file
alexshpilkin May 16, 2022
cae7524
cog: fix path in pkg-config file
alexshpilkin May 16, 2022
3a46bad
cxxopts: fix path in pkg-config file
alexshpilkin May 16, 2022
eed4382
plasma5Packages.drumstick: fix paths in pkg-config files
alexshpilkin May 16, 2022
bbb47fd
eccodes: fix paths in pkg-config files
alexshpilkin May 16, 2022
f74f367
entt: fix path in pkg-config file
alexshpilkin May 16, 2022
c7757a2
gbenchmark: fix paths in pkg-config file
alexshpilkin May 16, 2022
a1b03a4
geos: fix paths in pkg-config file
alexshpilkin May 16, 2022
738e888
getdns: fix paths in pkg-config file
alexshpilkin May 16, 2022
35a3c63
google-cloud-cpp: fix paths in pkg-config files
alexshpilkin May 17, 2022
e84188c
libbaseencode: fix paths in pkg-config file
alexshpilkin May 17, 2022
3706b06
libbtbb: fix paths in pkg-config file
alexshpilkin May 17, 2022
c627ccf
libcork: fix paths in pkg-config file
alexshpilkin May 17, 2022
69ff649
libcotp: fix paths in pkg-config file
alexshpilkin May 17, 2022
d75acc0
libdnf: fix path in pkg-config file
alexshpilkin May 17, 2022
34c8d45
libiio: fix paths in pkg-config file
alexshpilkin May 17, 2022
5b3e94c
libkeyfinder: fix paths in pkg-config file
alexshpilkin May 17, 2022
68ef94e
lxqt.lxqt-build-tools: fix paths in generated pkg-config files
alexshpilkin May 17, 2022
898f662
libmodule: fix paths in pkg-config file
alexshpilkin May 17, 2022
1b72d31
libnats-c: fix path in pkg-config file
alexshpilkin May 17, 2022
0652be6
libquotient: fix paths in pkg-config file
alexshpilkin May 17, 2022
32851a9
libsurvive: fix path in pkg-config file
alexshpilkin May 17, 2022
3687ae2
libtorrent-rasterbar: fix paths in pkg-config file
alexshpilkin May 18, 2022
33c0932
fixup 2fbfcad79a1 use upstream fix
alexshpilkin May 18, 2022
2f5f9a9
libtsm: fix paths in pkg-config file
alexshpilkin May 18, 2022
333fa3a
libunarr: fix paths in pkg-config file
alexshpilkin May 18, 2022
7368d37
maliit-framework: fix paths in pkg-config files
alexshpilkin May 18, 2022
e05fc95
mysocketw: fix path in pkg-config file
alexshpilkin May 18, 2022
0c3abef
nanomsg: fix path in pkg-config file
alexshpilkin May 18, 2022
38d34ad
notcurses: fix paths in pkg-config files
alexshpilkin May 18, 2022
adfe4cf
obexftp: fix paths in pkg-config file
alexshpilkin May 18, 2022
ea7cbe0
olm: fix paths in pkg-config file
alexshpilkin May 18, 2022
243e996
opencolorio: fix path in pkg-config file
alexshpilkin May 18, 2022
a56ddc8
opendht: fix paths in pkg-config file
alexshpilkin May 18, 2022
fea268e
fixup 91b683318e5 escaping
alexshpilkin May 18, 2022
42c2657
openxr-loader: fix path in pkg-config file
alexshpilkin May 18, 2022
20dc199
orcania: fix paths in pkg-config file
alexshpilkin May 18, 2022
77a4e90
openwebrx: fix paths in pkg-config file
alexshpilkin May 18, 2022
f8c8b28
powercap: fix paths in pkg-config file
alexshpilkin May 18, 2022
c839327
proj: fix paths in CMake and pkg-config files
alexshpilkin May 18, 2022
5eff4f4
prometheus-cpp: fix paths in pkg-config files
alexshpilkin May 18, 2022
e35cdb8
rabbitmq-c: fix paths in pkg-config file
alexshpilkin May 18, 2022
24518f6
recastnavigation: fix paths in pkg-config file
alexshpilkin May 18, 2022
6973a5a
reproc: fix paths in pkg-config files
alexshpilkin May 18, 2022
b377ca5
rinutils: fix path in pkg-config file
alexshpilkin May 18, 2022
41f554c
rnp: fix path in pkg-config file
alexshpilkin May 18, 2022
adc0fa6
rocm-thunk: fix paths in pkg-config file
alexshpilkin May 18, 2022
759cf1e
seexpr: fix path in pkg-config file
alexshpilkin May 18, 2022
339b4bd
sentencepiece: fix paths in pkg-config file
alexshpilkin May 18, 2022
ad3a58a
shadowsocks-libev: fix paths in pkg-config files
alexshpilkin May 18, 2022
d558bef
soapysdr: fix paths in pkg-config file
alexshpilkin May 18, 2022
12205df
spdlog: fix path in pkg-config file
alexshpilkin May 18, 2022
1198abc
spirv-headers: fix path in pkg-config file
alexshpilkin May 18, 2022
1dcc563
tdlib: fix paths in pkg-config files
alexshpilkin May 18, 2022
98ce40a
tinyobjloader: fix paths in pkg-config file
alexshpilkin May 18, 2022
633b60b
fixup a1b03a463df use upstream fix
alexshpilkin May 18, 2022
75235b3
fixup 76e5d0c0789 use upstream fix
alexshpilkin May 19, 2022
59ce8c2
libbaseencode: 1.0.12 -> 1.0.14
alexshpilkin May 19, 2022
b61acfb
libcotp: 1.2.4 -> 1.2.6
alexshpilkin May 19, 2022
2361850
fixup 20dc1995934 use upstream fix
alexshpilkin May 19, 2022
ee37130
fixup 5b3e94c69d9 use upstream fix
alexshpilkin May 19, 2022
5b57746
xsimd: fix path in pkg-config file
alexshpilkin May 19, 2022
acee5b1
xtensor: fix path in pkg-config file
alexshpilkin May 19, 2022
f3b9a8a
libzra: fix paths in pkg-config file
alexshpilkin May 26, 2022
bc2aee8
fixup 41f554cda0e use upstream fix
alexshpilkin Jun 1, 2022
73a41bf
fixup 68ef94e545c add upstreaming note
alexshpilkin Jun 1, 2022
fd3435d
fixup b377ca57ab0 use upstream fix
alexshpilkin Jun 1, 2022
ad23326
rinutils: 0.10.0 -> 0.10.1
alexshpilkin Jun 1, 2022
8973b0a
revert 34c8d45f02c for upstream fix
alexshpilkin Jun 1, 2022
df99db8
libiio: 0.21 -> 0.23
alexshpilkin Jun 2, 2022
133a1ac
fixup 7368d376d52 use upstream fix
alexshpilkin Jun 2, 2022
b06c284
fixup 77a4e90b7e2 use upstream fix
alexshpilkin Jun 2, 2022
7a925c8
fixup 45e0d3c2911 use upstream fix
alexshpilkin Jun 2, 2022
372e946
fixup 3fdaf9f8811 use upstream fix
alexshpilkin Jun 2, 2022
61b4600
fixup e05fc95e027 use upstream fix
alexshpilkin Jun 3, 2022
e935bf7
fixup f8c8b28d130 use upstream fix
alexshpilkin Jun 3, 2022
9f0567d
fixup 12205dfc2b1 use upstream fix
alexshpilkin Jun 3, 2022
248292d
revert 5eff4f4c188 for upstream fix
alexshpilkin Jun 3, 2022
3688d1b
prometheus-cpp: 1.0.0 -> 1.0.1
alexshpilkin Jun 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions pkgs/applications/misc/maliit-framework/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,24 @@ mkDerivation rec {
wayland-protocols
];

# https://github.com/maliit/framework/issues/106
postPatch = ''
substituteInPlace common/maliit-framework.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace maliit-glib/maliit-glib.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace src/maliit-plugins.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_DATADIR@ @CMAKE_INSTALL_FULL_DATADIR@
substituteInPlace src/maliit-server.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_DATADIR@ @CMAKE_INSTALL_FULL_DATADIR@
alexshpilkin marked this conversation as resolved.
Show resolved Hide resolved
'';

preConfigure = ''
cmakeFlags+="-DQT5_PLUGINS_INSTALL_DIR=$out/$qtPluginPrefix"
'';
Expand Down
7 changes: 7 additions & 0 deletions pkgs/applications/radio/openwebrx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ let
soapysdr-with-plugins
];

# https://github.com/jketterl/owrx_connector/issues/15
postPatch = ''
substituteInPlace src/lib/owrx-connector.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/jketterl/owrx_connector";
description = "A set of connectors that are used by OpenWebRX to interface with SDR hardware";
Expand Down
7 changes: 7 additions & 0 deletions pkgs/applications/radio/soapysdr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,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
Expand Down
9 changes: 9 additions & 0 deletions pkgs/desktops/lxqt/lxqt-build-tools/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, mkDerivation
, fetchpatch
, fetchFromGitHub
, cmake
, pkg-config
Expand All @@ -22,6 +23,14 @@ mkDerivation rec {
sha256 = "vzppKTDwADBG5pOaluT858cWCKFFRaSbHz2Qhe6799E=";
};

patches = [
# https://github.com/lxqt/lxqt-build-tools/pull/76
(fetchpatch {
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.
Expand Down
6 changes: 6 additions & 0 deletions pkgs/development/compilers/seexpr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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/";
Expand Down
10 changes: 10 additions & 0 deletions pkgs/development/libraries/arrow-cpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ stdenv.mkDerivation rec {
patchShebangs build-support/
substituteInPlace "src/arrow/vendored/datetime/tz.cpp" \
--replace 'discover_tz_dir();' '"${tzdata}/share/zoneinfo";'

# https://issues.apache.org/jira/browse/ARROW-16585
substituteInPlace src/parquet/parquet.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace src/plasma/plasma.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_BINDIR@ @CMAKE_INSTALL_FULL_BINDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
substituteInPlace src/plasma/PlasmaConfig.cmake.in \
--replace @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@ @CMAKE_INSTALL_FULL_BINDIR@
'';

cmakeFlags = [
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/libraries/audio/libkeyfinder/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ stdenv.mkDerivation rec {

doCheck = true;

# https://github.com/mixxxdj/libkeyfinder/issues/21
postPatch = ''
substituteInPlace packaging/libkeyfinder.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';

meta = with lib; {
description = "Musical key detection for digital audio (C++ library)";
homepage = "https://mixxxdj.github.io/libkeyfinder/";
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/bcg729/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/libraries/cglm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
6 changes: 6 additions & 0 deletions pkgs/development/libraries/cm256cc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
6 changes: 6 additions & 0 deletions pkgs/development/libraries/cxxopts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
14 changes: 14 additions & 0 deletions pkgs/development/libraries/drumstick/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ stdenv.mkDerivation rec {

postPatch = ''
substituteInPlace library/rt/backendmanager.cpp --subst-var out

# https://sourceforge.net/p/drumstick/bugs/39/
substituteInPlace drumstick-alsa.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace drumstick-file.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace drumstick-rt.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace drumstick-widgets.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
Comment on lines +23 to +34
Copy link
Member

@SuperSandro2000 SuperSandro2000 May 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
substituteInPlace drumstick-alsa.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace drumstick-file.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace drumstick-rt.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace drumstick-widgets.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
for file in drumstick-alsa.pc.in drumstick-file.pc.in drumstick-rt.pc.in drumstick-widgets.pc.in; do
substituteInPlace $file \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(For this package specifically the fix is already committed and upstream promised a release soon so I’ll try and wait for that.)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v2.6.1 released:
https://sourceforge.net/p/drumstick/news/2022/05/drumstick-libraries-261-released-/

This problem with the pkg-config files should be solved, and also the need of a patch for locating the drumstick backends when CMAKE_INSTALL_LIBDIR has an absolute path.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(For this package specifically the fix is already committed and upstream promised a release soon so I’ll try and wait for that.)

More than one month after a new upstream release has been published, nobody has bothered to upgrade the NixOS package, neither @alexshpilkin has updated his patch.
cc: @dotlambda: this is why I think that flathub/flatpak and friends are fixing a fundamental flaw of conventional Linux packaging.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrolcl You can see I bet on fixing all of the brokenness at once. The delay is because I lost: among the problematic packages is google-cloud-cpp, where the maintainer, commendably, went for a substantial refactor rather than patch over the couple dozen autogenerated files as they had them, but now I need to bump it three versions and figure out C++ ABI compatibility and each failing compile takes several hours on my scruffy i5. I haven’t yet got back to that unpleasantness, that’s all. I know it’s a poor response to the quick fixes I received from yourself and quite a number of others, but my emotional capacity has been extremely limited as of late. I am sorry, for what it’s worth.

(The benefits and drawbacks of having a packager intermediate between the author and the user have been extensively flamed elsewhere—hell if I know how I’m going to patch glslang and shaderc, which decided to vendor broken headers I otherwise already fixed—but in any case Nixpkgs, unlike Debian or Fedora or even FreeBSD ports, does not have a coherent team of package maintainers, so it’s perfectly normal for anyone to submit a version bump. If there hasn’t been one, then nobody either had a need for it or knew enough to make it. That is the price for having what’s probably the most extensive collection of packages in existence, and it’s not going to be acceptable to everyone.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you use some package which does not have a maintainer then i recommend adding yourself as a maintainer for it and submitting a pr updating it, that is the best thing you can do.

If nobody cares about drumstick in NixOS, then there is an easier solution: remove it. The problem is that other projects depend on it. I hope that @orivej cares about VMPK and kmetronome.

I don't use NixOS myself, but I am a developer of the package we are talking about. I have no plans of packaging my projects for all and every Linux distro out there. For me Flathub is a perfect solution: I only have to care about a single repository, and I can offer all my projects even if they are all niche products.

@dotlambda: another problem with the Linux distros is the niche applications. They are often excluded from the repositories. There are 232987 projects known to repology (because they are at least in one repository). The the topmost repository by number of projects is nixpkgs unstable with 72002 projects (31% of the total).

Here is an example of a niche application: dmidiplayer available for FreeBSD, MacOS, and Windows, but excluded of most Linux distros.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#179594

When I saw that NixOS was patching my library sources, I've included another fix in the release 2.6.1

I don't know if the new version with the old patch that is still being applied works, but any way you are risking that the patch don't apply in a future release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use NixOS myself, but I am a developer of the package we are talking about. I have no plans of packaging my projects for all and every Linux distro out there.

You don't have to. That's the job of packagers. If users want a package for a specific distro, let them request it to the distro maintainers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if the new version with the old patch that is still being applied works, but any way you are risking that the patch don't apply in a future release.

That can always happen and then the patch needs to be adjusted in the next update. Not a problem and pretty normal.

'';

outputs = [ "out" "dev" "man" ];
Expand Down
11 changes: 11 additions & 0 deletions pkgs/development/libraries/eccodes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
6 changes: 6 additions & 0 deletions pkgs/development/libraries/entt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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++";
Expand Down
6 changes: 6 additions & 0 deletions pkgs/development/libraries/ffmpegthumbnailer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/gbenchmark/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 9 additions & 6 deletions pkgs/development/libraries/geos/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, cmake }:

stdenv.mkDerivation rec {
Expand All @@ -12,13 +13,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-ULvFmaw4a0wrOWLcxBHwBAph8gSq7066ciXs3Qz0VxU=";
};

nativeBuildInputs = [ cmake ];
# https://github.com/libgeos/geos/issues/608
patches = [
(fetchpatch {
url = "https://github.com/libgeos/geos/commit/11faa4db672ed61d64fd8a6f1a59114f5b5f2406.patch";
sha256 = "1mvyg633xm21wd0ap7v7hd1kqmh2yh03shd81dvrzmdxdb02n050";
})
];

postPatch = ''
substituteInPlace tools/geos-config.in \
--replace "@libdir@" "@prefix@/lib" \
--replace "@includedir@" "@prefix@/include"
'';
nativeBuildInputs = [ cmake ];

meta = with lib; {
description = "C++ port of the Java Topology Suite (JTS)";
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/libraries/getdns/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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;
Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/libraries/google-cloud-cpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/gstreamer/bad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
, srt
, vo-aacenc
, libfreeaptx
, zxing-cpp
, VideoToolbox
, AudioToolbox
, AVFoundation
Expand Down Expand Up @@ -172,6 +173,7 @@ stdenv.mkDerivation rec {
srt
vo-aacenc
libfreeaptx
zxing-cpp
] ++ lib.optionals enableZbar [
zbar
] ++ lib.optionals faacSupport [
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/libraries/libargs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/libraries/libbaseencode/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ cmake ];

# https://github.com/paolostivanin/libbaseencode/issues/25
postPatch = ''
substituteInPlace baseencode.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';

meta = with lib; {
description = "Library written in C for encoding and decoding data using base32 or base64 (RFC-4648)";
homepage = "https://github.com/paolostivanin/libbaseencode";
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/libraries/libbtbb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ cmake ];

# 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";
Expand Down
Loading