1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

src/perl/meson.build: fall back to 'bz2' library lookup

Upstream `bzip2` does not provide `pkg-config` files. As a result an
attempt to build `nix` on some distributions like Gentoo failos the
configure as:

    $ meson setup ..
    ...
    Executing subproject perl
    ...
    perl| Run-time dependency bzip2 found: NO (tried pkgconfig and cmake)
    ../src/perl/meson.build:68:12: ERROR: Dependency "bzip2" not found, tried pkgconfig and cmake

The change falls back to `bz2` library for such cases.
This commit is contained in:
Sergei Trofimovich 2024-11-26 18:35:18 +00:00
parent d0f84fd2a5
commit d67aa03414

View file

@ -65,7 +65,13 @@ yath = find_program('yath', required : false)
# Required Libraries
#-------------------------------------------------
bzip2_dep = dependency('bzip2')
bzip2_dep = dependency('bzip2', required: false)
if not bzip2_dep.found()
bzip2_dep = cpp.find_library('bz2')
if not bzip2_dep.found()
error('No "bzip2" pkg-config or "bz2" library found')
endif
endif
curl_dep = dependency('libcurl')
libsodium_dep = dependency('libsodium')