nixpkgs/pkgs/by-name/sd/SDL2_net/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.0 KiB
Nix
Raw Normal View History

{
lib,
SDL2,
darwin,
fetchFromGitHub,
pkg-config,
stdenv,
# Boolean flags
enableSdltest ? (!stdenv.hostPlatform.isDarwin),
}:
stdenv.mkDerivation (finalAttrs: {
pname = "SDL2_net";
2022-12-24 13:50:43 +00:00
version = "2.2.0";
2014-08-03 17:49:32 +00:00
src = fetchFromGitHub {
owner = "libsdl-org";
repo = "SDL_net";
rev = "release-${finalAttrs.version}";
hash = "sha256-sEcKn/apA6FcR7ijb7sfuvP03ZdVfjkNZTXsasK8fAI=";
2014-08-03 17:49:32 +00:00
};
2023-04-15 17:34:06 +00:00
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
SDL2
pkg-config
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.libobjc
];
propagatedBuildInputs = [ SDL2 ];
2014-08-03 17:49:32 +00:00
configureFlags = [
(lib.enableFeature false "examples") # can't find libSDL2_test.a
(lib.enableFeature enableSdltest "sdltest")
];
strictDeps = true;
meta = {
homepage = "https://github.com/libsdl-org/SDL_net";
2014-08-03 17:49:32 +00:00
description = "SDL multiplatform networking library";
license = lib.licenses.zlib;
maintainers = lib.teams.sdl.members ++ (with lib.maintainers; [ ]);
inherit (SDL2.meta) platforms;
2014-08-03 17:49:32 +00:00
};
})