nixpkgs/pkgs/by-name/ma/mar1d/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

58 lines
1.4 KiB
Nix

{ stdenv
, lib
, SDL2
, SDL2_mixer
, libGLU
, libconfig
, meson
, ninja
, pkg-config
, fetchFromGitHub
, fetchpatch
}:
stdenv.mkDerivation rec {
pname = "MAR1D";
version = "unstable-2023-02-02";
src = fetchFromGitHub {
hash = "sha256-kZERhwnTpBhjx6MLdf1bYCWMjtTiId/5a69kRt+/6oY=";
rev = "fa5dc36e1819a15539ced339ad01672e5a498c5c";
repo = "MAR1D";
owner = "Radvendii";
};
nativeBuildInputs = [ meson ninja pkg-config ];
buildInputs = [
SDL2
SDL2_mixer
libconfig
libGLU
];
patches = [
# Fix the build on Darwin.
# https://github.com/Radvendii/MAR1D/pull/4
(fetchpatch {
url = "https://github.com/Radvendii/MAR1D/commit/baf3269e90eca69f154a43c4c1ef14677a6300fd.patch";
hash = "sha256-ybdLA2sO8e0J7w4roSdMWn72OkttD3y+cJ3ScuGiHCI=";
})
];
meta = with lib; {
description = "First person Super Mario Bros";
mainProgram = "MAR1D";
longDescription = ''
The original Super Mario Bros as you've never seen it. Step into Mario's
shoes in this first person clone of the classic Mario game. True to the
original, however, the game still takes place in a two dimensional world.
You must view the world as mario does, as a one dimensional line.
'';
homepage = "https://mar1d.com";
license = licenses.agpl3Only;
maintainers = with maintainers; [ taeer ];
platforms = platforms.unix;
};
}