diff options
author | AndersonTorres <torres.anderson.85@protonmail.com> | 2022-02-15 23:28:16 -0300 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@protonmail.com> | 2022-02-16 01:38:20 -0300 |
commit | 8d65e832f0a18f60e2040940c80d96373ac8b88c (patch) | |
tree | 3d6ade66b2a81403e3852b80b9e7c660699b6ed6 /pkgs/applications/emulators/zsnes/default.nix | |
parent | 19574af0af3ffaf7c9e359744ed32556f34536bd (diff) | |
download | nixpkgs-8d65e832f0a18f60e2040940c80d96373ac8b88c.tar nixpkgs-8d65e832f0a18f60e2040940c80d96373ac8b88c.tar.gz nixpkgs-8d65e832f0a18f60e2040940c80d96373ac8b88c.tar.bz2 nixpkgs-8d65e832f0a18f60e2040940c80d96373ac8b88c.tar.lz nixpkgs-8d65e832f0a18f60e2040940c80d96373ac8b88c.tar.xz nixpkgs-8d65e832f0a18f60e2040940c80d96373ac8b88c.tar.zst nixpkgs-8d65e832f0a18f60e2040940c80d96373ac8b88c.zip |
Move misc/emulators to applications/emulators - part 1
Emulators form a class by themselves. So, they should be moved to applications/.
Diffstat (limited to 'pkgs/applications/emulators/zsnes/default.nix')
-rw-r--r-- | pkgs/applications/emulators/zsnes/default.nix | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/zsnes/default.nix b/pkgs/applications/emulators/zsnes/default.nix new file mode 100644 index 00000000000..ba2f5d6bdc1 --- /dev/null +++ b/pkgs/applications/emulators/zsnes/default.nix @@ -0,0 +1,64 @@ +{ lib, stdenv, fetchFromGitHub, nasm, SDL, zlib, libpng, ncurses, libGLU, libGL +, makeDesktopItem }: + +let + desktopItem = makeDesktopItem { + name = "zsnes"; + exec = "zsnes"; + icon = "zsnes"; + comment = "A SNES emulator"; + desktopName = "zsnes"; + genericName = "zsnes"; + categories = "Game;"; + }; + +in stdenv.mkDerivation { + pname = "zsnes"; + version = "1.51"; + + src = fetchFromGitHub { + owner = "emillon"; + repo = "zsnes"; + rev = "fc160b2538738995f600f8405d23a66b070dac02"; + sha256 = "1gy79d5wdaacph0cc1amw7mqm7i0716n6mvav16p1svi26iz193v"; + }; + + buildInputs = [ nasm SDL zlib libpng ncurses libGLU libGL ]; + + prePatch = '' + for i in $(cat debian/patches/series); do + echo "applying $i" + patch -p1 < "debian/patches/$i" + done + ''; + + preConfigure = '' + cd src + sed -i "/^STRIP/d" configure + sed -i "/\$STRIP/d" configure + ''; + + configureFlags = [ "--enable-release" ]; + + postInstall = '' + function installIcon () { + mkdir -p $out/share/icons/hicolor/$1/apps/ + cp icons/$1x32.png $out/share/icons/hicolor/$1/apps/zsnes.png + } + installIcon "16x16" + installIcon "32x32" + installIcon "48x48" + installIcon "64x64" + + mkdir -p $out/share/applications + ln -s ${desktopItem}/share/applications/* $out/share/applications/ + ''; + + meta = { + description = "A Super Nintendo Entertainment System Emulator"; + license = lib.licenses.gpl2Plus; + maintainers = [ lib.maintainers.sander ]; + homepage = "https://www.zsnes.com"; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} |