about summary refs log tree commit diff
path: root/pkgs/by-name/me
diff options
context:
space:
mode:
authorAnthony Roussel <anthony@roussel.dev>2023-10-30 21:13:17 +0100
committerAnthony Roussel <anthony@roussel.dev>2023-10-30 21:32:22 +0100
commit398758b86b506192aafe93b6d44d9af6c853d6ea (patch)
tree5acbb59b0da88b4589a75e91bac720218361ead1 /pkgs/by-name/me
parent13f5021c1cd9b05d215774b08bae2d4903d7ed5b (diff)
downloadnixlib-398758b86b506192aafe93b6d44d9af6c853d6ea.tar
nixlib-398758b86b506192aafe93b6d44d9af6c853d6ea.tar.gz
nixlib-398758b86b506192aafe93b6d44d9af6c853d6ea.tar.bz2
nixlib-398758b86b506192aafe93b6d44d9af6c853d6ea.tar.lz
nixlib-398758b86b506192aafe93b6d44d9af6c853d6ea.tar.xz
nixlib-398758b86b506192aafe93b6d44d9af6c853d6ea.tar.zst
nixlib-398758b86b506192aafe93b6d44d9af6c853d6ea.zip
meritous: migrate to by-name
Diffstat (limited to 'pkgs/by-name/me')
-rw-r--r--pkgs/by-name/me/meritous/package.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/by-name/me/meritous/package.nix b/pkgs/by-name/me/meritous/package.nix
new file mode 100644
index 000000000000..c7631f2370db
--- /dev/null
+++ b/pkgs/by-name/me/meritous/package.nix
@@ -0,0 +1,40 @@
+{ 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 ${lib.getDev SDL}/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;
+  };
+}
+