mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
meritous: reenable stack protection and apply the proposed patch
Instead of applying `sed` locally let's apply the patch pending upstream inclusion.
This commit is contained in:
parent
4a21427ac9
commit
1472953abb
1 changed files with 15 additions and 8 deletions
|
@ -2,6 +2,7 @@
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchFromGitLab,
|
fetchFromGitLab,
|
||||||
|
fetchpatch,
|
||||||
SDL,
|
SDL,
|
||||||
SDL_image,
|
SDL_image,
|
||||||
SDL_mixer,
|
SDL_mixer,
|
||||||
|
@ -19,13 +20,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hash = "sha256-6KK2anjX+fPsYf4HSOHQ0EQBINqZiVbxo1RmBR6pslg=";
|
hash = "sha256-6KK2anjX+fPsYf4HSOHQ0EQBINqZiVbxo1RmBR6pslg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix stack overflow on too long files:
|
||||||
|
# https://gitlab.com/meritous/meritous/-/merge_requests/5
|
||||||
|
(fetchpatch {
|
||||||
|
name = "fix-overflow.patch";
|
||||||
|
url = "https://gitlab.com/meritous/meritous/-/commit/68029f02ccaea86fb96d6dd01edb269ac3e6eff0.patch";
|
||||||
|
hash = "sha256-YRV0cEcn6nEJUdHF/cheezNbsgZmjy0rSUw0tuhUYf0=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile \
|
||||||
--replace "prefix=/usr/local" "prefix=$out" \
|
--replace "prefix=/usr/local" "prefix=$out" \
|
||||||
--replace sdl-config ${lib.getDev SDL}/bin/sdl-config
|
--replace sdl-config ${lib.getDev SDL}/bin/sdl-config
|
||||||
|
|
||||||
substituteInPlace src/audio.c \
|
|
||||||
--replace "filename[64]" "filename[256]"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -36,15 +44,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
install -m 555 -D meritous $out/bin/meritous
|
install -m 555 -D meritous $out/bin/meritous
|
||||||
mkdir -p $out/share/meritous
|
mkdir -p $out/share/meritous
|
||||||
cp -r dat/* $out/share/meritous/
|
cp -r dat/* $out/share/meritous/
|
||||||
'';
|
|
||||||
|
|
||||||
hardeningDisable = [
|
runHook postInstall
|
||||||
"stackprotector"
|
'';
|
||||||
"fortify"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Action-adventure dungeon crawl game";
|
description = "Action-adventure dungeon crawl game";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue