Merge pull request #291286 from atorres1985-contrib/lgames

lgames: migrate to by-name
This commit is contained in:
Weijia Wang 2024-03-08 20:22:47 +01:00 committed by GitHub
commit 582a0ad152
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 74 additions and 80 deletions

View File

@ -1,16 +1,16 @@
{ lib
, stdenv
, fetchurl
, SDL
, SDL_mixer
, fetchurl
, stdenv
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "barrage";
version = "1.0.7";
src = fetchurl {
url = "mirror://sourceforge/lgames/${pname}-${version}.tar.gz";
url = "mirror://sourceforge/lgames/barrage-${finalAttrs.version}.tar.gz";
hash = "sha256-cGYrG7A4Ffh51KyR+UpeWu7A40eqxI8g4LefBIs18kg=";
};
@ -21,12 +21,13 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
meta = with lib; {
meta = {
homepage = "https://lgames.sourceforge.io/Barrage/";
description = "A destructive action game";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
license = with lib.licenses; [ gpl2Plus ];
mainProgram = "barrage";
maintainers = with lib.maintainers; [ AndersonTorres ];
inherit (SDL.meta) platforms;
broken = stdenv.isDarwin;
};
}
})

View File

@ -0,0 +1,49 @@
{ lib
, SDL
, SDL_mixer
, fetchpatch
, fetchurl
, libintl
, libpng
, stdenv
, zlib
}:
stdenv.mkDerivation (finalAttrs: {
pname = "lbreakout2";
version = "2.6.5";
src = fetchurl {
url = "mirror://sourceforge/lgames/lbreakout2-${finalAttrs.version}.tar.gz";
hash = "sha256-kQTWF1VT2jRC3GpfxAemaeL1r/Pu3F0wQJ6wA7enjW8=";
};
patches = [
(fetchpatch {
url = "https://sources.debian.org/data/main/l/lbreakout2/2.6.5-2/debian/patches/sdl_fix_pauses.patch";
hash = "sha256-ycsuxfokpOblLky42MwtJowdEp7v5dZRMFIR4id4ZBI=";
})
];
buildInputs = [
SDL
SDL_mixer
libintl
libpng
zlib
];
# With fortify it crashes at runtime:
# *** buffer overflow detected ***: terminated
# Aborted (core dumped)
hardeningDisable = [ "fortify" ];
meta = {
homepage = "http://lgames.sourceforge.net/LBreakout2/";
description = "Breakout clone from the LGames series";
license = with lib.licenses; [ gpl2Plus ];
mainProgram = "lbreakout2";
maintainers = with lib.maintainers; [ AndersonTorres ciil ];
platforms = lib.platforms.unix;
};
})

View File

@ -1,11 +1,11 @@
{ lib
, stdenv
, fetchurl
, directoryListingUpdater
, SDL2
, SDL2_image
, SDL2_mixer
, SDL2_ttf
, directoryListingUpdater
, fetchurl
, stdenv
}:
stdenv.mkDerivation (finalAttrs: {
@ -36,6 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
homepage = "https://lgames.sourceforge.io/LBreakoutHD/";
description = "A widescreen Breakout clone";
license = lib.licenses.gpl2Plus;
mainProgram = "lbreakouthd";
maintainers = with lib.maintainers; [ AndersonTorres ];
inherit (SDL2.meta) platforms;
broken = stdenv.isDarwin;

View File

@ -1,19 +1,19 @@
{ lib
, stdenv
, fetchurl
, SDL2
, SDL2_image
, SDL2_mixer
, SDL2_ttf
, directoryListingUpdater
, fetchurl
, stdenv
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "lpairs2";
version = "2.3";
src = fetchurl {
url = "mirror://sourceforge/lgames/${pname}-${version}.tar.gz";
url = "mirror://sourceforge/lgames/lpairs2-${finalAttrs.version}.tar.gz";
hash = "sha256-gw1BNkcztyTuoXRdx5+TBZNJEJNrLCfEUCQ1JzROogA=";
};
@ -25,17 +25,18 @@ stdenv.mkDerivation rec {
];
passthru.updateScript = directoryListingUpdater {
inherit pname version;
inherit (finalAttrs) pname version;
url = "https://lgames.sourceforge.io/LPairs/";
extraRegex = "(?!.*-win(32|64)).*";
};
meta = with lib; {
broken = stdenv.isDarwin;
meta = {
homepage = "http://lgames.sourceforge.net/LPairs/";
description = "Matching the pairs - a typical Memory Game";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
license = with lib.licenses; [ gpl2Plus ];
mainProgram = "lpairs2";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
broken = stdenv.isDarwin;
};
}
})

View File

@ -1,48 +0,0 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, SDL
, SDL_mixer
, libintl
, libpng
, zlib
}:
stdenv.mkDerivation rec {
pname = "lbreakout2";
version = "2.6.5";
src = fetchurl {
url = "mirror://sourceforge/lgames/${pname}-${version}.tar.gz";
sha256 = "0vwdlyvh7c4y80q5vp7fyfpzbqk9lq3w8pvavi139njkalbxc14i";
};
# Can't exit from pause without this patch
patches = [(fetchpatch {
url = "https://sources.debian.org/data/main/l/lbreakout2/2.6.5-2/debian/patches/sdl_fix_pauses.patch";
hash = "sha256-ycsuxfokpOblLky42MwtJowdEp7v5dZRMFIR4id4ZBI=";
})];
buildInputs = [
SDL
SDL_mixer
libintl
libpng
zlib
];
# With fortify it crashes at runtime:
# *** buffer overflow detected ***: terminated
# Aborted (core dumped)
hardeningDisable = [ "fortify" ];
meta = with lib; {
homepage = "http://lgames.sourceforge.net/LBreakout2/";
description = "Breakout clone from the LGames series";
license = licenses.gpl2Plus;
maintainers = [ maintainers.ciil ];
platforms = platforms.unix;
hydraPlatforms = lib.platforms.linux; # sdl-config times out on darwin
};
}

View File

@ -37039,16 +37039,6 @@ with pkgs;
zdoom = callPackage ../games/doom-ports/zdoom { };
### GAMES/LGAMES
barrage = callPackage ../games/lgames/barrage { };
lbreakout2 = callPackage ../games/lgames/lbreakout2 { };
lbreakouthd = callPackage ../games/lgames/lbreakouthd { };
lpairs2 = callPackage ../games/lgames/lpairs2 { };
maelstrom = callPackage ../games/maelstrom { };
mar1d = callPackage ../games/mar1d { } ;