mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
68927918d0
The indentation stripping semantics of strings are fairly bad and have a few gotchas where the resulting string has not the intended indentation. This commit fixes most if not all such instances in Nixpkgs. I tried to strive a balance between keeping the diff small and reformatting/refactoring the code to look better. In general, reformatting should be left to Nixfmt. Note that this causes a lot of rebuilds by design. All changes need to be thoroughly vetted and reviewed for correctness. There is no automatic way to prove correctness. List of files to fix generated by running https://gerrit.lix.systems/c/lix/+/2092 on Nixpkgs and looking at the warnings.
48 lines
1.6 KiB
Nix
48 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 = "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 = "https://fltrator.sourceforge.net/";
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.marius851000 ];
|
|
license = licenses.gpl3;
|
|
};
|
|
|
|
}
|