2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, autoreconfHook
|
|
|
|
, libmd
|
|
|
|
, gitUpdater
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libbsd";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.11.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://libbsd.freedesktop.org/releases/${pname}-${version}.tar.xz";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-m6oYYFnrvyXAYwjp+ZH9ox9xg8DySTGCbYOqar2KAmE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# darwin changes configure.ac which means we need to regenerate
|
|
|
|
# the configure scripts
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [ libmd ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [ ./darwin.patch ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
# No nicer place to find latest release.
|
|
|
|
url = "https://gitlab.freedesktop.org/libbsd/libbsd.git";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Common functions found on BSD systems";
|
|
|
|
homepage = "https://libbsd.freedesktop.org/";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = with licenses; [ beerware bsd2 bsd3 bsdOriginal isc mit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
|
|
|
};
|
|
|
|
}
|