mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
46 lines
1.6 KiB
Nix
46 lines
1.6 KiB
Nix
{ lib, stdenv, fetchurl, unzip, fltk, which, libjpeg }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "fltrator";
|
|
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 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;
|
|
};
|
|
|
|
}
|