10 stdenv.mkDerivation rec {
15 url = "https://libbsd.freedesktop.org/releases/${pname}-${version}.tar.xz";
16 hash = "sha256-uIzJFj0MZSqvOamZkdl03bocOpcR248bWDivKhRzEBQ=";
25 enableParallelBuilding = true;
29 nativeBuildInputs = [ autoreconfHook ];
30 propagatedBuildInputs = [ libmd ];
33 # `strtonum(3)` is not available on our default SDK version.
34 # https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/30
35 ./darwin-enable-strtonum.patch
38 passthru.updateScript = gitUpdater {
39 # No nicer place to find latest release.
40 url = "https://gitlab.freedesktop.org/libbsd/libbsd.git";
43 # Fix undefined reference errors with version script under LLVM.
44 configureFlags = lib.optionals (
45 stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17"
46 ) [ "LDFLAGS=-Wl,--undefined-version" ];
49 description = "Common functions found on BSD systems";
50 homepage = "https://libbsd.freedesktop.org/";
51 license = with licenses; [
59 platforms = platforms.unix;
60 # See architectures defined in src/local-elf.h.
61 badPlatforms = lib.platforms.microblaze;
62 maintainers = with maintainers; [ matthewbauer ];