diff options
author | Nick Cao <nickcao@nichi.co> | 2024-01-18 09:42:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 09:42:08 -0500 |
commit | 672a0c9745836976835cc68067825d675278f2db (patch) | |
tree | b52f6f80a8b3fc6b1e3f1cdd923ef9427c643951 /pkgs | |
parent | 596c7486aa58d29941ef9af26616b0d9d03c6a6a (diff) | |
parent | 267373a696d4b48facd0fbc987de8ca55b8e521a (diff) |
Merge pull request #217164 from SuperSandro2000/sdl2-image-cleanup
SDL2_image_2_0: use finalAttrs, remove version,hash from inputs, remove patch version from attr
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/SDL2_image/default.nix | 15 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 21 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 20 insertions, 18 deletions
diff --git a/pkgs/development/libraries/SDL2_image/default.nix b/pkgs/development/libraries/SDL2_image/default.nix index a472083c2569b..03b3f146ca939 100644 --- a/pkgs/development/libraries/SDL2_image/default.nix +++ b/pkgs/development/libraries/SDL2_image/default.nix @@ -1,20 +1,15 @@ { lib, stdenv, fetchurl , pkg-config , SDL2, libpng, libjpeg, libtiff, giflib, libwebp, libXpm, zlib, Foundation -, version ? "2.8.2" -, hash ? "sha256-j0hrv7z4Rk3VjJ5dkzlKsCVc5otRxalmqRgkSCCnbdw=" }: -let +stdenv.mkDerivation (finalAttrs: { pname = "SDL2_image"; -in - -stdenv.mkDerivation { - inherit pname version; + version = "2.8.2"; src = fetchurl { - url = "https://www.libsdl.org/projects/SDL_image/release/${pname}-${version}.tar.gz"; - inherit hash; + url = "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${finalAttrs.version}.tar.gz"; + hash = "sha256-j0hrv7z4Rk3VjJ5dkzlKsCVc5otRxalmqRgkSCCnbdw="; }; nativeBuildInputs = [ pkg-config ]; @@ -44,4 +39,4 @@ stdenv.mkDerivation { license = licenses.zlib; maintainers = with maintainers; [ cpages ]; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index af2881c145b58..4cfe9c05e4f9e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24884,15 +24884,22 @@ with pkgs; SDL2_image = callPackage ../development/libraries/SDL2_image { inherit (darwin.apple_sdk.frameworks) Foundation; }; - SDL2_image_2_0_5 = SDL2_image.override({ # Pinned for pygame, toppler + # Pinned for pygame, toppler + SDL2_image_2_0 = SDL2_image.overrideAttrs (oldAttrs: { version = "2.0.5"; - hash = "sha256-vdX24CZoL31+G+C2BRsgnaL0AqLdi9HEvZwlrSYxCNA"; + src = fetchurl { + inherit (oldAttrs.src) url; + hash = "sha256-vdX24CZoL31+G+C2BRsgnaL0AqLdi9HEvZwlrSYxCNA"; + }; }); - SDL2_image_2_6 = SDL2_image.override({ - # Pinned for hedgewars: - # https://github.com/NixOS/nixpkgs/pull/274185#issuecomment-1856764786 + # Pinned for hedgewars: + # https://github.com/NixOS/nixpkgs/pull/274185#issuecomment-1856764786 + SDL2_image_2_6 = SDL2_image.overrideAttrs (oldAttrs: { version = "2.6.3"; - hash = "sha256-kxyb5b8dfI+um33BV4KLfu6HTiPH8ktEun7/a0g2MSw="; + src = fetchurl { + inherit (oldAttrs.src) url; + hash = "sha256-kxyb5b8dfI+um33BV4KLfu6HTiPH8ktEun7/a0g2MSw="; + }; }); SDL2_mixer = callPackage ../development/libraries/SDL2_mixer { @@ -38380,7 +38387,7 @@ with pkgs; tome4 = callPackage ../games/tome4 { }; toppler = callPackage ../games/toppler { - SDL2_image = SDL2_image_2_0_5; + SDL2_image = SDL2_image_2_0; }; torus-trooper = callPackage ../games/torus-trooper { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cc62743493f24..173d4da103b5b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10460,7 +10460,7 @@ self: super: with self; { pygame = callPackage ../development/python-modules/pygame { inherit (pkgs.darwin.apple_sdk.frameworks) AppKit; - SDL2_image = pkgs.SDL2_image_2_0_5; + SDL2_image = pkgs.SDL2_image_2_0; }; pygame-sdl2 = callPackage ../development/python-modules/pygame-sdl2 { }; |