nixpkgs/pkgs/by-name/ma/mars/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

35 lines
1.0 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, sfml, fribidi, taglib }:
stdenv.mkDerivation rec {
pname = "mars";
version = "unstable-17.10.2021";
src = fetchFromGitHub {
owner = "thelaui";
repo = "M.A.R.S.";
rev = "84664cda094efe6e49d9b1550e4f4f98c33eefa2";
sha256 = "sha256-SWLP926SyVTjn+UT1DCaJSo4Ue0RbyzImVnlNJQksS0=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libGLU libGL sfml fribidi taglib ];
installPhase = ''
cd ..
mkdir -p "$out/share/mars/"
mkdir -p "$out/bin/"
cp -rv data resources credits.txt license.txt "$out/share/mars/"
cp -v marsshooter "$out/bin/mars.bin"
cat << EOF > "$out/bin/mars"
#! ${stdenv.shell}
cd "$out/share/mars/"
exec "$out/bin/mars.bin" "\$@"
EOF
chmod +x "$out/bin/mars"
'';
meta = with lib; {
homepage = "https://mars-game.sourceforge.net/";
description = "Game about fighting with ships in a 2D space setting";
license = licenses.gpl3Plus;
maintainers = [ maintainers.astsmtl ];
platforms = platforms.linux;
};
}