2023-02-04 20:34:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, autoreconfHook
|
|
|
|
, libmd
|
|
|
|
, gitUpdater
|
|
|
|
}:
|
2018-06-06 03:43:49 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libbsd";
|
2023-02-04 20:34:08 +00:00
|
|
|
version = "0.11.7";
|
2018-06-06 03:43:49 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://libbsd.freedesktop.org/releases/${pname}-${version}.tar.xz";
|
2023-02-04 20:34:08 +00:00
|
|
|
hash = "sha256-m6oYYFnrvyXAYwjp+ZH9ox9xg8DySTGCbYOqar2KAmE=";
|
2018-06-06 03:43:49 +00:00
|
|
|
};
|
|
|
|
|
2020-04-19 18:54:59 +00:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
|
|
|
|
2018-06-06 03:43:49 +00:00
|
|
|
# darwin changes configure.ac which means we need to regenerate
|
|
|
|
# the configure scripts
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2021-11-11 10:32:15 +00:00
|
|
|
propagatedBuildInputs = [ libmd ];
|
2018-06-06 03:43:49 +00:00
|
|
|
|
2019-10-13 16:41:06 +00:00
|
|
|
patches = [ ./darwin.patch ];
|
2018-06-06 03:43:49 +00:00
|
|
|
|
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 ];
|
2018-06-06 03:43:49 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
|
|
|
};
|
|
|
|
}
|