Skip to content

Commit

Permalink
ivan: add full iconset
Browse files Browse the repository at this point in the history
  • Loading branch information
Free Potion committed Mar 19, 2020
1 parent fbebd5f commit a35282f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkgs/games/ivan/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, SDL2, SDL2_mixer, alsaLib, libpng
, pcre, graphicsmagick, makeDesktopItem }:
, pcre, makeDesktopItem }:

stdenv.mkDerivation rec {

Expand All @@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "04jzs8wad2b3g9hvnijr4r89iiw6b1i44zdzkg0dy447lrw6l6xc";
};

nativeBuildInputs = [ cmake pkgconfig graphicsmagick ];
nativeBuildInputs = [ cmake pkgconfig ];

buildInputs = [ SDL2 SDL2_mixer alsaLib libpng pcre ];

Expand All @@ -36,12 +36,19 @@ stdenv.mkDerivation rec {
comment = meta.description;
};

# Create appropriate directories. Convert "Icon.bmp" to "ivan.png", then copy
# it and "ivan.desktop" to these directories.
# Create appropriate directories. Copy icons and desktop item to these directories.
postInstall = ''
mkdir -p $out/share/applications
mkdir -p $out/share/icons/hicolor/16x16/apps
mkdir -p $out/share/icons/hicolor/32x32/apps
gm convert $src/Graphics/Icon.bmp $out/share/icons/hicolor/32x32/apps/ivan.png
mkdir -p $out/share/icons/hicolor/128x128/apps
mkdir -p $out/share/icons/hicolor/256x256/apps
mkdir -p $out/share/icons/hicolor/512x512/apps
cp $src/Graphics/icons/shadowless.iconset/icon_16x16.png $out/share/icons/hicolor/16x16/apps/ivan.png
cp $src/Graphics/icons/shadowless.iconset/icon_32x32.png $out/share/icons/hicolor/32x32/apps/ivan.png
cp $src/Graphics/icons/shadowless.iconset/icon_128x128.png $out/share/icons/hicolor/128x128/apps/ivan.png
cp $src/Graphics/icons/shadowless.iconset/icon_256x256.png $out/share/icons/hicolor/256x256/apps/ivan.png
cp $src/Graphics/icons/shadowless.iconset/icon_512x512.png $out/share/icons/hicolor/512x512/apps/ivan.png
cp ${ivanDesktop}/share/applications/* $out/share/applications
'';

Expand Down

0 comments on commit a35282f

Please sign in to comment.