1{ stdenv, fetchurl, autoreconfHook }:
2
3stdenv.mkDerivation rec {
4 name = "libbsd-${version}";
5 version = "0.8.7";
6
7 src = fetchurl {
8 url = "http://libbsd.freedesktop.org/releases/${name}.tar.xz";
9 sha256 = "0c9bl49zs0xdddcwj5dh0lay9sxi2m1yi74848g8p87mb87g2j7m";
10 };
11
12 # darwin changes configure.ac which means we need to regenerate
13 # the configure scripts
14 nativeBuildInputs = [ autoreconfHook ];
15
16 patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin.patch ];
17
18 meta = with stdenv.lib; {
19 description = "Common functions found on BSD systems";
20 homepage = https://libbsd.freedesktop.org/;
21 license = licenses.bsd3;
22 platforms = platforms.linux ++ platforms.darwin;
23 maintainers = with maintainers; [ matthewbauer ];
24 };
25}