about summary refs log tree commit diff
path: root/pkgs/applications/emulators/zsnes
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2023-01-21 20:28:21 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-01-22 20:26:20 -0300
commit2e49ab3319a5e3cfdb0921cf513f89cff33e48bb (patch)
tree89897b0068cbd13098ff23b51044ddec0ff9cbe5 /pkgs/applications/emulators/zsnes
parent02114099f0168babb6ed77292336fc37a63f3f49 (diff)
zsnes2: init at 2.0.10
Diffstat (limited to 'pkgs/applications/emulators/zsnes')
-rw-r--r--pkgs/applications/emulators/zsnes/2.x.nix63
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/zsnes/2.x.nix b/pkgs/applications/emulators/zsnes/2.x.nix
new file mode 100644
index 0000000000000..fdb4ad9fa139b
--- /dev/null
+++ b/pkgs/applications/emulators/zsnes/2.x.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, SDL
+, libGL
+, libGLU
+, libpng
+, nasm
+, pkg-config
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "zsnes2";
+  version = "2.0.10";
+
+  src = fetchFromGitHub {
+    owner = "xyproto";
+    repo = "zsnes";
+    rev = finalAttrs.version;
+    hash = "sha256-QFPl3I2nFWMmgQRGxrlt4Vh5N4SygvBLjeFiQpgRr8o=";
+  };
+
+  nativeBuildInputs = [
+    nasm
+    pkg-config
+  ];
+
+  buildInputs = [
+    SDL
+    libGL
+    libGLU
+    libpng
+    zlib
+  ];
+
+  dontConfigure = true;
+
+  NIX_CFLAGS_COMPILE = [
+    # Until upstream fixes the issues...
+    "-Wp,-D_FORTIFY_SOURCE=0"
+  ];
+
+  installFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  postInstall = ''
+    install -Dm644 linux/zsnes.desktop $out/share/applications/zsnes.desktop
+    install -Dm644 icons/16x16x32.png $out/share/icons/hicolor/16x16/apps/zsnes.png
+    install -Dm644 icons/32x32x32.png $out/share/icons/hicolor/32x32/apps/zsnes.png
+    install -Dm644 icons/48x48x32.png $out/share/icons/hicolor/48x48/apps/zsnes.png
+    install -Dm644 icons/64x64x32.png $out/share/icons/hicolor/64x64/apps/zsnes.png
+  '';
+
+  meta = {
+    homepage = "https://github.com/xyproto/zsnes";
+    description = "A maintained fork of zsnes";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.AndersonTorres ];
+    platforms = lib.intersectLists lib.platforms.linux lib.platforms.x86;
+  };
+})