about summary refs log tree commit diff
path: root/pkgs/by-name/lb
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2024-03-02 18:21:34 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2024-03-02 19:08:07 -0300
commit4e7309d4c1f6cf54d36fdab638379ba70d75adf7 (patch)
tree841e2771136831349181f3e620eb83ea22389a8e /pkgs/by-name/lb
parent674fc88fdaaacd07dec21fb1969d301abc159866 (diff)
lbreakout2: migrate to by-name
Diffstat (limited to 'pkgs/by-name/lb')
-rw-r--r--pkgs/by-name/lb/lbreakout2/package.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/by-name/lb/lbreakout2/package.nix b/pkgs/by-name/lb/lbreakout2/package.nix
new file mode 100644
index 0000000000000..f554a1683eee1
--- /dev/null
+++ b/pkgs/by-name/lb/lbreakout2/package.nix
@@ -0,0 +1,48 @@
+{ 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
+  };
+}