Skip to content

Commit

Permalink
Merge pull request #308360 from atorres1985-contrib/sdl2_net
Browse files Browse the repository at this point in the history
SDL2_net: adopt and refactor
  • Loading branch information
superherointj authored May 2, 2024
2 parents 8daae6f + a131585 commit 1f49ce9
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 32 deletions.
50 changes: 50 additions & 0 deletions pkgs/by-name/sd/SDL2_net/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
lib,
SDL2,
darwin,
fetchFromGitHub,
pkg-config,
stdenv,
# Boolean flags
enableSdltest ? (!stdenv.isDarwin),
}:

stdenv.mkDerivation (finalAttrs: {
pname = "SDL2_net";
version = "2.2.0";

src = fetchFromGitHub {
owner = "libsdl-org";
repo = "SDL_net";
rev = "release-${finalAttrs.version}";
hash = "sha256-sEcKn/apA6FcR7ijb7sfuvP03ZdVfjkNZTXsasK8fAI=";
};

outputs = [ "out" "dev" ];

nativeBuildInputs = [
SDL2
pkg-config
];

buildInputs = lib.optionals stdenv.isDarwin [
darwin.libobjc
];

propagatedBuildInputs = [ SDL2 ];

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";
description = "SDL multiplatform networking library";
license = lib.licenses.zlib;
maintainers = with lib.maintainers; [ AndersonTorres ];
inherit (SDL2.meta) platforms;
};
})
30 changes: 0 additions & 30 deletions pkgs/development/libraries/SDL2_net/default.nix

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24344,8 +24344,6 @@ with pkgs;
# SDL2_mixer_2_0 pinned for lzwolf
SDL2_mixer_2_0 = callPackage ../development/libraries/SDL2_mixer/2_0.nix { };

SDL2_net = callPackage ../development/libraries/SDL2_net { };

SDL2_gfx = callPackage ../development/libraries/SDL2_gfx { };

SDL2_sound = callPackage ../development/libraries/SDL2_sound {
Expand Down

0 comments on commit 1f49ce9

Please sign in to comment.