about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/lb
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/lb')
-rw-r--r--nixpkgs/pkgs/by-name/lb/lbreakout2/package.nix49
-rw-r--r--nixpkgs/pkgs/by-name/lb/lbreakouthd/package.nix44
2 files changed, 93 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/lb/lbreakout2/package.nix b/nixpkgs/pkgs/by-name/lb/lbreakout2/package.nix
new file mode 100644
index 000000000000..bd88ac2a21f2
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/lb/lbreakout2/package.nix
@@ -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;
+  };
+})
diff --git a/nixpkgs/pkgs/by-name/lb/lbreakouthd/package.nix b/nixpkgs/pkgs/by-name/lb/lbreakouthd/package.nix
new file mode 100644
index 000000000000..0160d7e2033b
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/lb/lbreakouthd/package.nix
@@ -0,0 +1,44 @@
+{ lib
+, SDL2
+, SDL2_image
+, SDL2_mixer
+, SDL2_ttf
+, directoryListingUpdater
+, fetchurl
+, stdenv
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "lbreakouthd";
+  version = "1.1.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/lgames/lbreakouthd-${finalAttrs.version}.tar.gz";
+    hash = "sha256-Gor2LnM8vi6skJbzfR5023J13GxvqcpIrua9S+nT/S0=";
+  };
+
+  buildInputs = [
+    SDL2
+    SDL2_image
+    SDL2_mixer
+    SDL2_ttf
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  passthru.updateScript = directoryListingUpdater {
+    inherit (finalAttrs) pname version;
+    url = "https://lgames.sourceforge.io/LBreakoutHD/";
+    extraRegex = "(?!.*-win(32|64)).*";
+  };
+
+  meta = {
+    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;
+  };
+})