2018-06-06 04:43:49 +01:00
|
|
|
{ stdenv, fetchurl, autoreconfHook }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libbsd-${version}";
|
2018-09-07 02:43:49 +01:00
|
|
|
version = "0.9.1";
|
2018-06-06 04:43:49 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://libbsd.freedesktop.org/releases/${name}.tar.xz";
|
2018-09-07 02:43:49 +01:00
|
|
|
sha256 = "1957w2wi7iqar978qlfsm220dwywnrh5m58nrnn9zmi74ds3bn2n";
|
2018-06-06 04:43:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# darwin changes configure.ac which means we need to regenerate
|
|
|
|
# the configure scripts
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2018-10-14 01:53:19 +01:00
|
|
|
patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch
|
|
|
|
# Suitable for all but limited to musl to avoid rebuild
|
|
|
|
++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./musl.patch;
|
2018-06-06 04:43:49 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Common functions found on BSD systems";
|
|
|
|
homepage = https://libbsd.freedesktop.org/;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
|
|
|
};
|
|
|
|
}
|