2023-02-04 20:34:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2024-02-11 01:29:45 +00:00
|
|
|
, fetchurl
|
2023-02-04 20:34:08 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, libmd
|
|
|
|
, gitUpdater
|
|
|
|
}:
|
2018-06-06 03:43:49 +00:00
|
|
|
|
2024-02-11 01:29:45 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libbsd";
|
2024-02-11 01:29:45 +00:00
|
|
|
version = "0.11.8";
|
2018-06-06 03:43:49 +00:00
|
|
|
|
2024-02-11 01:29:45 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://libbsd.freedesktop.org/releases/${pname}-${version}.tar.xz";
|
|
|
|
hash = "sha256-Vf36Jpb7TVWlkvqa0Uqd+JfHsACN2zswxBmRSEH4XzM=";
|
2018-06-06 03:43:49 +00:00
|
|
|
};
|
|
|
|
|
2020-04-19 18:54:59 +00:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
|
|
|
|
2023-08-03 22:57:13 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2023-08-04 07:47:23 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2018-06-06 03:43:49 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2021-11-11 10:32:15 +00:00
|
|
|
propagatedBuildInputs = [ libmd ];
|
2018-06-06 03:43:49 +00:00
|
|
|
|
2024-02-11 01:29:45 +00:00
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
2023-08-03 22:57:13 +00:00
|
|
|
# Temporary build system hack from upstream maintainer
|
|
|
|
# https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/19#note_2017684
|
|
|
|
./darwin-fix-libbsd.sym.patch
|
|
|
|
];
|
|
|
|
|
2023-02-04 20:34:08 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
# No nicer place to find latest release.
|
|
|
|
url = "https://gitlab.freedesktop.org/libbsd/libbsd.git";
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2018-06-06 03:43:49 +00:00
|
|
|
description = "Common functions found on BSD systems";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://libbsd.freedesktop.org/";
|
2022-02-18 17:56:43 +00:00
|
|
|
license = with licenses; [ beerware bsd2 bsd3 bsdOriginal isc mit ];
|
2023-08-03 22:57:13 +00:00
|
|
|
platforms = platforms.unix;
|
2023-12-13 23:57:23 +00:00
|
|
|
# See architectures defined in src/local-elf.h.
|
|
|
|
badPlatforms = lib.platforms.microblaze;
|
2018-06-06 03:43:49 +00:00
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
|
|
|
};
|
|
|
|
}
|