about summary refs log tree commit diff
path: root/pkgs/by-name/sd
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2024-05-10 20:11:05 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2024-06-04 08:19:09 -0300
commit113627be08048763444a93117b2e7be5761a445c (patch)
treef4e8a9cb753ecc91cff783c5822d8acccf0d96b6 /pkgs/by-name/sd
parent41724a307380a35642fdd67e3e39ad3938a61798 (diff)
SDL_net: refactor
- finalAttrs
- strictDeps
- sdl team
Diffstat (limited to 'pkgs/by-name/sd')
-rw-r--r--pkgs/by-name/sd/SDL_net/package.nix44
1 files changed, 32 insertions, 12 deletions
diff --git a/pkgs/by-name/sd/SDL_net/package.nix b/pkgs/by-name/sd/SDL_net/package.nix
index e902213c9710f..4d45ff624e8f9 100644
--- a/pkgs/by-name/sd/SDL_net/package.nix
+++ b/pkgs/by-name/sd/SDL_net/package.nix
@@ -1,23 +1,43 @@
-{ lib, stdenv, fetchurl, SDL, pkg-config }:
+{
+  lib,
+  SDL,
+  fetchurl,
+  pkg-config,
+  stdenv,
+  # Boolean flags
+  enableSdltest ? (!stdenv.isDarwin)
+}:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "SDL_net";
   version = "1.2.8";
 
   src = fetchurl {
-    url = "http://www.libsdl.org/projects/SDL_net/release/${pname}-${version}.tar.gz";
-    sha256 = "1d5c9xqlf4s1c01gzv6cxmg0r621pq9kfgxcg3197xw4p25pljjz";
+    url = "http://www.libsdl.org/projects/SDL_net/release/SDL_net-${finalAttrs.version}.tar.gz";
+    hash = "sha256-X0p6i7iE95PCeKw/NxO+QZgMXu3M7P8CYEETR3FPrLQ=";
   };
 
-  configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
+  nativeBuildInputs = [
+    SDL
+    pkg-config
+  ];
 
-  nativeBuildInputs = [ pkg-config ];
-  propagatedBuildInputs = [ SDL ];
+  propagatedBuildInputs = [
+    SDL
+  ];
 
-  meta = with lib; {
+  configureFlags = [
+    (lib.enableFeature enableSdltest "sdltest")
+  ];
+
+  strictDeps = true;
+
+  meta = {
+    homepage = "https://github.com/libsdl-org/SDL_net";
     description = "SDL networking library";
-    platforms = platforms.unix;
-    license = licenses.zlib;
-    homepage = "https://www.libsdl.org/projects/SDL_net/release-1.2.html";
+    license = lib.licenses.zlib;
+    maintainers =  lib.teams.sdl.members
+                   ++ (with lib.maintainers; [ ]);
+    inherit (SDL.meta) platforms;
   };
-}
+})