mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 09:33:41 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitLab, SDL, SDL_image, SDL_mixer, zlib }:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "meritous";
|
|
version = "1.4";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "meritous";
|
|
repo = "meritous";
|
|
rev = "314af46d84d2746eec4c30a0f63cbc2e651d5303";
|
|
sha256 = "1hrwm65isg5nwzydyd8gvgl3p36sbj09rsn228sppr8g5p9sm10x";
|
|
};
|
|
|
|
prePatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace "CPPFLAGS +=" "CPPFLAGS += -DSAVES_IN_HOME -DDATADIR=\\\"$out/share/meritous\\\"" \
|
|
--replace sld-config ${SDL.dev}/bin/sdl-config
|
|
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; {
|
|
description = "Action-adventure dungeon crawl game";
|
|
homepage = "http://www.asceai.net/meritous/";
|
|
license = licenses.gpl3;
|
|
maintainers = [ maintainers.alexvorobiev ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|
|
|