SDL2_image_2_0: use finalAttrs, remove version,hash from inputs, remove patch version from attr

This commit is contained in:
Sandro Jäckel 2023-02-18 17:33:02 +01:00
parent fd309df083
commit 267373a696
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
3 changed files with 20 additions and 18 deletions

View File

@ -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 ];
};
}
})

View File

@ -24890,15 +24890,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 {
@ -38383,7 +38390,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 { };

View File

@ -10444,7 +10444,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 { };