Merge pull request #59956 from lightbulbjim/dosbox-icon

dosbox: add XDG icon
This commit is contained in:
Renaud 2019-04-22 20:12:48 +02:00 committed by GitHub
commit 861416711a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU_combined, libpng }: { stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU_combined, libpng, graphicsmagick }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dosbox-0.74-2"; name = "dosbox-0.74-2";
@ -12,11 +12,14 @@ stdenv.mkDerivation rec {
buildInputs = [ SDL SDL_net SDL_sound libGLU_combined libpng ]; buildInputs = [ SDL SDL_net SDL_sound libGLU_combined libpng ];
nativeBuildInputs = [ graphicsmagick ];
configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest"; configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
desktopItem = makeDesktopItem { desktopItem = makeDesktopItem {
name = "dosbox"; name = "dosbox";
exec = "dosbox"; exec = "dosbox";
icon = "dosbox";
comment = "x86 emulator with internal DOS"; comment = "x86 emulator with internal DOS";
desktopName = "DOSBox"; desktopName = "DOSBox";
genericName = "DOS emulator"; genericName = "DOS emulator";
@ -26,6 +29,9 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
mkdir -p $out/share/applications mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications cp ${desktopItem}/share/applications/* $out/share/applications
mkdir -p $out/share/icons/hicolor/256x256/apps
gm convert src/dosbox.ico $out/share/icons/hicolor/256x256/apps/dosbox.png
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;