From 5eb428e355b952b45465faf3a11a6f9999731737 Mon Sep 17 00:00:00 2001 From: marius851000 Date: Fri, 14 Dec 2018 10:35:10 +0100 Subject: [PATCH] fltrator : init at 2.3 fltrator : added patch to made fltrator-landscape use the correct data directory. fltrator : corrected an error with meta fltrator : enhancement based on srhb suggestion fltrator : add .desktop fltrator : enanced the build file, based on suggestion of jtojnar & srhb fltrator : use nativeBuildInput rather that buildInputs. suggested by jtojnar fltrator : desktop file is now pointing to the specific binary, and has icon. fltrator : deleted the manual unpack phase --- maintainers/maintainer-list.nix | 5 ++++ pkgs/games/fltrator/default.nix | 45 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 52 insertions(+) create mode 100644 pkgs/games/fltrator/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 320a1aab9c3..38113420d3e 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2640,6 +2640,11 @@ email = "markus@wotringer.de"; name = "Markus Wotringer"; }; + marius851000 = { + email = "mariusdavid@laposte.net"; + name = "Marius David"; + github = "marius851000"; + }; marsam = { email = "marsam@users.noreply.github.com"; github = "marsam"; diff --git a/pkgs/games/fltrator/default.nix b/pkgs/games/fltrator/default.nix new file mode 100644 index 00000000000..ef46ea840b7 --- /dev/null +++ b/pkgs/games/fltrator/default.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchurl, unzip, fltk, which, libjpeg }: + +stdenv.mkDerivation rec { + name = "fltrator-${version}"; + version = "2.3"; + + src = fetchurl { + url = "mirror://sourceforge/fltrator/fltrator-${version}-code.zip"; + sha256 = "125aqq1sfrm0c9cm6gyylwdmc8xrb0rjf563xvw7q28sdbl6ayp7"; + }; + + buildInputs = [ fltk libjpeg ]; + nativeBuildInputs = [ unzip which ]; + + postPatch = '' + substituteInPlace src/fltrator.cxx\ + --replace 'home += "fltrator/"' "home = \"$out/fltrator/\"" + substituteInPlace src/fltrator-landscape.cxx\ + --replace 'home += "fltrator/"' "home = \"$out/fltrator/\"" + substituteInPlace rsc/fltrator.desktop \ + --replace 'Exec=fltrator' "Exec=$out/bin/fltrator" + ''; + + dontAddPrefix = true; + + makeFlags = [ "HOME=$(out)" "RSC_PATH=$(out)/fltrator"]; + + postInstall = '' + mkdir -p $out/share/applications + cp rsc/fltrator.desktop $out/share/applications + mkdir -p $out/share/icons/hicolor/128x128/apps/ + cp rsc/fltrator-128.png $out/share/icons/hicolor/128x128/apps/fltrator2.png + ''; + + meta = with stdenv.lib; { + description = "A simple retro style arcade side-scroller game."; + longDescription = '' FLTrator is a simple retro style arcade side-scroller game in which you steer a spaceship through a landscape with hostile rockets and other obstacles. + It has ten different levels and a level editor to create new levels or modify the existing.''; # from https://libregamewiki.org/FLTrator + homepage = http://fltrator.sourceforge.net/; + platforms = platforms.linux; + maintainers = [ maintainers.marius851000 ]; + license = licenses.gpl3; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 89d4921657e..8b133b817d8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20489,6 +20489,8 @@ in exult = callPackage ../games/exult { }; + fltrator = callPackage ../games/fltrator { }; + factorio = callPackage ../games/factorio { releaseType = "alpha"; }; factorio-experimental = factorio.override { releaseType = "alpha"; experimental = true; };