summary refs log tree commit diff
path: root/pkgs/development/libraries/SDL2
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-09-01 21:56:18 +0300
committerK900 <me@0upti.me>2023-09-02 09:31:10 +0300
commit083e133f671a9b001fd04e0c25b8621df829acfa (patch)
tree79002ffdf17ba06023b7cd2b4e32e94e89313925 /pkgs/development/libraries/SDL2
parentea5959eb5671c1e3f9c16141f35990360c892035 (diff)
downloadnixpkgs-083e133f671a9b001fd04e0c25b8621df829acfa.tar
nixpkgs-083e133f671a9b001fd04e0c25b8621df829acfa.tar.gz
nixpkgs-083e133f671a9b001fd04e0c25b8621df829acfa.tar.bz2
nixpkgs-083e133f671a9b001fd04e0c25b8621df829acfa.tar.lz
nixpkgs-083e133f671a9b001fd04e0c25b8621df829acfa.tar.xz
nixpkgs-083e133f671a9b001fd04e0c25b8621df829acfa.tar.zst
nixpkgs-083e133f671a9b001fd04e0c25b8621df829acfa.zip
SDL2: 2.28.2 -> 2.28.3
Also add update script and switch to fetchFromGitHub (so the update script works)

Diff: https://github.com/libsdl-org/SDL/compare/release-2.28.2...release-2.28.3

Changelog: https://github.com/libsdl-org/SDL/releases/tag/release-2.28.3
Diffstat (limited to 'pkgs/development/libraries/SDL2')
-rw-r--r--pkgs/development/libraries/SDL2/default.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index 4c8c7ed8f43..7b741b803de 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -1,7 +1,8 @@
 { lib
 , stdenv
 , config
-, fetchurl
+, fetchFromGitHub
+, nix-update-script
 , pkg-config
 , libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
 , openglSupport ? libGLSupported
@@ -55,11 +56,13 @@
 
 stdenv.mkDerivation rec {
   pname = "SDL2";
-  version = "2.28.2";
+  version = "2.28.3";
 
-  src = fetchurl {
-    url = "https://www.libsdl.org/release/${pname}-${version}.tar.gz";
-    hash = "sha256-ZLEQL6Igk1FbAu8z3Yc53uG6V+nbumoJKUK4u+0aHF4=";
+  src = fetchFromGitHub {
+    owner = "libsdl-org";
+    repo = "SDL";
+    rev = "release-${version}";
+    hash = "sha256-/kQ2IyvAfmZ+zIUt1WuEIeX0nYPGXDlAQk2qDsQnFFs=";
   };
   dontDisableStatic = if withStatic then 1 else 0;
   outputs = [ "out" "dev" ];
@@ -165,7 +168,10 @@ stdenv.mkDerivation rec {
 
   setupHook = ./setup-hook.sh;
 
-  passthru = { inherit openglSupport; };
+  passthru = {
+    inherit openglSupport;
+    updateScript = nix-update-script { extraArgs = ["--version-regex" "release-(.*)"]; };
+  };
 
   meta = with lib; {
     description = "A cross-platform multimedia library";