Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a561896aa7f9
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b1e9876a4a1a
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 9, 2020

  1. ivan: add icon and desktop item

    Free Potion committed Jan 9, 2020

    Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    59a5aec View commit details
  2. Merge pull request #76792 from freepotion/ivan-add-desktop-item

    ivan: add icon and desktop item
    grahamc authored Jan 9, 2020

    Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    b1e9876 View commit details
Showing with 23 additions and 2 deletions.
  1. +23 −2 pkgs/games/ivan/default.nix
25 changes: 23 additions & 2 deletions pkgs/games/ivan/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, SDL2, SDL2_mixer, alsaLib, libpng, pcre }:
{ stdenv, fetchFromGitHub, cmake, pkgconfig, SDL2, SDL2_mixer, alsaLib, libpng
, pcre, graphicsmagick, makeDesktopItem }:

stdenv.mkDerivation rec {

@@ -12,7 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "0mavmwikfsyr5sp65sl8dqknl1yz7c7ds53y1qkma24vsikz3k64";
};

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

buildInputs = [ SDL2 SDL2_mixer alsaLib libpng pcre ];

@@ -24,6 +25,26 @@ stdenv.mkDerivation rec {
# Help CMake find SDL_mixer.h
NIX_CFLAGS_COMPILE = "-I${SDL2_mixer}/include/SDL2";

# Create "ivan.desktop" file
ivanDesktop = makeDesktopItem {
name = pname;
exec = pname;
icon = "ivan.png";
desktopName = "IVAN";
genericName = pname;
categories = "Game;AdventureGame;RolePlaying;";
comment = meta.description;
};

# Create appropriate directories. Convert "Icon.bmp" to "ivan.png", then copy
# it and "ivan.desktop" to these directories.
postInstall = ''
mkdir -p $out/share/applications
mkdir -p $out/share/icons/hicolor/32x32/apps
gm convert $src/Graphics/Icon.bmp $out/share/icons/hicolor/32x32/apps/ivan.png
cp ${ivanDesktop}/share/applications/* $out/share/applications
'';

meta = with stdenv.lib; {
description = "Graphical roguelike game";
longDescription = ''