mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 06:31:20 +00:00
flightgear: add .desktop file
This commit is contained in:
parent
1adef647a5
commit
0a4d53cc5e
@ -2,6 +2,7 @@
|
||||
, freeglut, freealut, mesa, libICE, libjpeg, openal, openscenegraph, plib
|
||||
, libSM, libunwind, libX11, xproto, libXext, xextproto, libXi, inputproto
|
||||
, libXmu, libXt, simgear, zlib, boost, cmake, libpng, udev, fltk13, apr
|
||||
, makeDesktopItem
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -18,6 +19,23 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0qjvcj2cz7ypa91v95lws44fg8c1p0pazv24ljkai2m2r0jgsv8k";
|
||||
};
|
||||
|
||||
# Of all the files in the source and data archives, there doesn't seem to be
|
||||
# a decent icon :-)
|
||||
iconsrc = fetchurl {
|
||||
url = "http://wiki.flightgear.org/images/6/62/FlightGear_logo.png";
|
||||
sha256 = "1ikz413jia55vfnmx8iwrlxvx8p16ggm81mbrj66wam3q7s2dm5p";
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "flightgear";
|
||||
exec = "fgfs";
|
||||
icon = "${iconsrc}";
|
||||
comment = "FlightGear Flight Simulator";
|
||||
desktopName = "FlightGear";
|
||||
genericName = "Flight simulator";
|
||||
categories = "Game;Simulation";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
freeglut freealut mesa libICE libjpeg openal openscenegraph plib
|
||||
libSM libunwind libX11 xproto libXext xextproto libXi inputproto
|
||||
@ -31,6 +49,9 @@ stdenv.mkDerivation rec {
|
||||
postInstall = ''
|
||||
mkdir -p "$out/share/FlightGear"
|
||||
tar xvf "${datasrc}" -C "$out/share/FlightGear/" --strip-components=1
|
||||
|
||||
mkdir -p "$out/share/applications/"
|
||||
cp "${desktopItem}"/share/applications/* "$out/share/applications/"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user