about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libbsd/default.nix
blob: fe4af163a542ba4106e9061b037bd02bd2835eba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ stdenv, fetchurl, autoreconfHook }:

stdenv.mkDerivation rec {
  pname = "libbsd";
  version = "0.9.1";

  src = fetchurl {
    url = "https://libbsd.freedesktop.org/releases/${pname}-${version}.tar.xz";
    sha256 = "1957w2wi7iqar978qlfsm220dwywnrh5m58nrnn9zmi74ds3bn2n";
  };

  # 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 rebuild
    ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./musl.patch;

  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 ];
  };
}