nixpkgs/pkgs/development/libraries/libbsd/default.nix

35 lines
1.2 KiB
Nix
Raw Normal View History

2017-04-21 02:17:43 +01:00
{ stdenv, fetchurl, autoreconfHook }:
2017-03-01 01:35:26 +00:00
stdenv.mkDerivation rec {
name = "libbsd-${version}";
2018-01-27 14:11:52 +00:00
version = "0.8.7";
2017-04-21 02:17:43 +01:00
src = fetchurl {
url = "http://libbsd.freedesktop.org/releases/${name}.tar.xz";
2018-01-27 14:11:52 +00:00
sha256 = "0c9bl49zs0xdddcwj5dh0lay9sxi2m1yi74848g8p87mb87g2j7m";
2017-04-21 02:17:43 +01:00
};
2017-04-21 02:17:43 +01:00
# darwin changes configure.ac which means we need to regenerate
# the configure scripts
nativeBuildInputs = [ autoreconfHook ];
patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch
# Suitable for all, but limited to musl to avoid rebuilds
2018-03-24 17:34:51 +00:00
++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
# https://cgit.freedesktop.org/libbsd/commit/?id=1f8a3f7bccfc84b195218ad0086ebd57049c3490
./non-glibc.patch
# https://cgit.freedesktop.org/libbsd/commit/?id=11ec8f1e5dfa1c10e0c9fb94879b6f5b96ba52dd
./cdefs.patch
# https://cgit.freedesktop.org/libbsd/commit/?id=b20272f5a966333b49fdf2bda797e2a9f0227404
./features.patch
];
2017-03-01 01:35:26 +00:00
meta = with stdenv.lib; {
description = "Common functions found on BSD systems";
homepage = https://libbsd.freedesktop.org/;
2017-03-01 01:35:26 +00:00
license = licenses.bsd3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ matthewbauer ];
};
}