1{ lib, stdenv, fetchurl, autoreconfHook, libmd }:
2
3stdenv.mkDerivation rec {
4 pname = "libbsd";
5 version = "0.11.6";
6
7 src = fetchurl {
8 url = "https://libbsd.freedesktop.org/releases/${pname}-${version}.tar.xz";
9 sha256 = "sha256-GbOPMXLq9pPm4caHFGNhkMfkiFHkUiTXILO1vASZtd8=";
10 };
11
12 outputs = [ "out" "dev" "man" ];
13
14 # darwin changes configure.ac which means we need to regenerate
15 # the configure scripts
16 nativeBuildInputs = [ autoreconfHook ];
17 propagatedBuildInputs = [ libmd ];
18
19 patches = [ ./darwin.patch ];
20
21 meta = with lib; {
22 description = "Common functions found on BSD systems";
23 homepage = "https://libbsd.freedesktop.org/";
24 license = with licenses; [ beerware bsd2 bsd3 bsdOriginal isc mit ];
25 platforms = platforms.linux ++ platforms.darwin;
26 maintainers = with maintainers; [ matthewbauer ];
27 };
28}