lol

meritous: reenable stack protection and apply the proposed patch

Instead of applying `sed` locally let's apply the patch pending upstream
inclusion.

+15 -8
+15 -8
pkgs/by-name/me/meritous/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitLab, 5 + fetchpatch, 5 6 SDL, 6 7 SDL_image, 7 8 SDL_mixer, ··· 19 20 hash = "sha256-6KK2anjX+fPsYf4HSOHQ0EQBINqZiVbxo1RmBR6pslg="; 20 21 }; 21 22 23 + patches = [ 24 + # Fix stack overflow on too long files: 25 + # https://gitlab.com/meritous/meritous/-/merge_requests/5 26 + (fetchpatch { 27 + name = "fix-overflow.patch"; 28 + url = "https://gitlab.com/meritous/meritous/-/commit/68029f02ccaea86fb96d6dd01edb269ac3e6eff0.patch"; 29 + hash = "sha256-YRV0cEcn6nEJUdHF/cheezNbsgZmjy0rSUw0tuhUYf0="; 30 + }) 31 + ]; 32 + 22 33 prePatch = '' 23 34 substituteInPlace Makefile \ 24 35 --replace "prefix=/usr/local" "prefix=$out" \ 25 36 --replace sdl-config ${lib.getDev SDL}/bin/sdl-config 26 - 27 - substituteInPlace src/audio.c \ 28 - --replace "filename[64]" "filename[256]" 29 37 ''; 30 38 31 39 buildInputs = [ ··· 36 44 ]; 37 45 38 46 installPhase = '' 47 + runHook preInstall 48 + 39 49 install -m 555 -D meritous $out/bin/meritous 40 50 mkdir -p $out/share/meritous 41 51 cp -r dat/* $out/share/meritous/ 52 + 53 + runHook postInstall 42 54 ''; 43 - 44 - hardeningDisable = [ 45 - "stackprotector" 46 - "fortify" 47 - ]; 48 55 49 56 meta = with lib; { 50 57 description = "Action-adventure dungeon crawl game";