nixpkgs/pkgs/by-name/me/meritous/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitLab, SDL, SDL_image, SDL_mixer, zlib }:
2017-10-24 01:51:14 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "meritous";
version = "1.5";
2017-10-24 01:51:14 +00:00
src = fetchFromGitLab {
owner = "meritous";
repo = "meritous";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-6KK2anjX+fPsYf4HSOHQ0EQBINqZiVbxo1RmBR6pslg=";
2017-10-24 01:51:14 +00:00
};
prePatch = ''
substituteInPlace Makefile \
--replace "prefix=/usr/local" "prefix=$out" \
--replace sdl-config ${lib.getDev SDL}/bin/sdl-config
2017-10-24 01:51:14 +00:00
substituteInPlace src/audio.c \
--replace "filename[64]" "filename[256]"
'';
buildInputs = [ SDL SDL_image SDL_mixer zlib ];
installPhase = ''
install -m 555 -D meritous $out/bin/meritous
mkdir -p $out/share/meritous
cp -r dat/* $out/share/meritous/
'';
hardeningDisable = [ "stackprotector" "fortify" ];
meta = with lib; {
2017-10-24 01:51:14 +00:00
description = "Action-adventure dungeon crawl game";
homepage = "https://gitlab.com/meritous/meritous";
changelog = "https://gitlab.com/meritous/meritous/-/blob/master/NEWS";
license = licenses.gpl3Only;
mainProgram = "meritous";
2017-10-24 01:51:14 +00:00
maintainers = [ maintainers.alexvorobiev ];
platforms = platforms.linux;
};
})