about summary refs log tree commit diff
path: root/pkgs/development/libraries/SDL2_net/default.nix
blob: 1640c5e3b86bcdd6b0243330cc1ccca923f1bfe5 (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
28
29
30
{ lib, stdenv, pkg-config, darwin, fetchurl, SDL2 }:

stdenv.mkDerivation rec {
  pname = "SDL2_net";
  version = "2.2.0";

  src = fetchurl {
    url = "https://www.libsdl.org/projects/SDL_net/release/${pname}-${version}.tar.gz";
    sha256 = "sha256-TkqJGYgxYnGXT/TpWF7R73KaEj0iwIvUcxKRedyFf+s=";
  };

  outputs = [ "out" "dev" ];

  nativeBuildInputs = [ pkg-config ];

  buildInputs = lib.optional stdenv.isDarwin darwin.libobjc;

  configureFlags = [ "--disable-examples" ]
  ++ lib.optional stdenv.isDarwin "--disable-sdltest";

  propagatedBuildInputs = [ SDL2 ];

  meta = with lib; {
    description = "SDL multiplatform networking library";
    homepage = "https://www.libsdl.org/projects/SDL_net";
    license = licenses.zlib;
    maintainers = with maintainers; [ ];
    platforms = platforms.unix;
  };
}