git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #59956 from lightbulbjim/dosbox-icon
8614167Renaud
pkgs/misc/emulators/dosbox/default.nix+7−1
@@ -1,4 +1,4 @@
1−{ stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU_combined, libpng }:
1+{ stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU_combined, libpng, graphicsmagick }:
2
2
3stdenv.mkDerivation rec {
3stdenv.mkDerivation rec {
4 name = "dosbox-0.74-2";
4 name = "dosbox-0.74-2";
@@ -12,11 +12,14 @@ stdenv.mkDerivation rec {
12
12
13 buildInputs = [ SDL SDL_net SDL_sound libGLU_combined libpng ];
13 buildInputs = [ SDL SDL_net SDL_sound libGLU_combined libpng ];
14
14
15+ nativeBuildInputs = [ graphicsmagick ];
16+
15 configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
17 configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
16
18
17 desktopItem = makeDesktopItem {
19 desktopItem = makeDesktopItem {
18 name = "dosbox";
20 name = "dosbox";
19 exec = "dosbox";
21 exec = "dosbox";
22+ icon = "dosbox";
20 comment = "x86 emulator with internal DOS";
23 comment = "x86 emulator with internal DOS";
21 desktopName = "DOSBox";
24 desktopName = "DOSBox";
22 genericName = "DOS emulator";
25 genericName = "DOS emulator";
@@ -26,6 +29,9 @@ stdenv.mkDerivation rec {
26 postInstall = ''
29 postInstall = ''
27 mkdir -p $out/share/applications
30 mkdir -p $out/share/applications
28 cp ${desktopItem}/share/applications/* $out/share/applications
31 cp ${desktopItem}/share/applications/* $out/share/applications
32+
33+ mkdir -p $out/share/icons/hicolor/256x256/apps
34+ gm convert src/dosbox.ico $out/share/icons/hicolor/256x256/apps/dosbox.png
29 '';
35 '';
30
36
31 enableParallelBuilding = true;
37 enableParallelBuilding = true;