presenterm: 0.9.0 -> 0.10.0 (#378946)
[NixPkgs.git] / pkgs / by-name / li / libbsd / package.nix
blob0bc9d73d4de886cf55fb28aa1f77d67162129808
2   lib,
3   stdenv,
4   fetchurl,
5   autoreconfHook,
6   libmd,
7   gitUpdater,
8 }:
10 stdenv.mkDerivation rec {
11   pname = "libbsd";
12   version = "0.12.2";
14   src = fetchurl {
15     url = "https://libbsd.freedesktop.org/releases/${pname}-${version}.tar.xz";
16     hash = "sha256-uIzJFj0MZSqvOamZkdl03bocOpcR248bWDivKhRzEBQ=";
17   };
19   outputs = [
20     "out"
21     "dev"
22     "man"
23   ];
25   enableParallelBuilding = true;
27   doCheck = true;
29   nativeBuildInputs = [ autoreconfHook ];
30   propagatedBuildInputs = [ libmd ];
32   patches = [
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
36   ];
38   passthru.updateScript = gitUpdater {
39     # No nicer place to find latest release.
40     url = "https://gitlab.freedesktop.org/libbsd/libbsd.git";
41   };
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" ];
48   meta = with lib; {
49     description = "Common functions found on BSD systems";
50     homepage = "https://libbsd.freedesktop.org/";
51     license = with licenses; [
52       beerware
53       bsd2
54       bsd3
55       bsdOriginal
56       isc
57       mit
58     ];
59     platforms = platforms.unix;
60     # See architectures defined in src/local-elf.h.
61     badPlatforms = lib.platforms.microblaze;
62     maintainers = with maintainers; [ matthewbauer ];
63   };