mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
commit
2f1b355747
@ -1,6 +1,18 @@
|
||||
{stdenv, fetchurl, fetchpatch, nasm, SDL, zlib, libpng, ncurses, mesa}:
|
||||
{stdenv, fetchurl, fetchpatch, nasm, SDL, zlib, libpng, ncurses, mesa
|
||||
, makeDesktopItem }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
let
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "zsnes";
|
||||
exec = "zsnes";
|
||||
icon = "zsnes";
|
||||
comment = "A SNES emulator";
|
||||
desktopName = "zsnes";
|
||||
genericName = "zsnes";
|
||||
categories = "Game;";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "zsnes-1.51";
|
||||
|
||||
src = fetchurl {
|
||||
@ -39,6 +51,20 @@ stdenv.mkDerivation {
|
||||
|
||||
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 = stdenv.lib.licenses.gpl2Plus;
|
||||
|
Loading…
Reference in New Issue
Block a user