mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
571c71e6f7
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.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, makeDesktopItem, SDL2, SDL2_net }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "maelstrom";
|
|
version = "3.0.7";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.libsdl.org/projects/Maelstrom/src/Maelstrom-${version}.tar.gz";
|
|
sha256 = "0dm0m5wd7amrsa8wnrblkv34sq4v4lglc2wfx8klfkdhyhi06s4k";
|
|
};
|
|
|
|
patches = [
|
|
# this fixes a typedef compilation error with gcc-3.x
|
|
./fix-compilation.patch
|
|
# removes register keyword
|
|
./c++17-fixes.diff
|
|
];
|
|
|
|
buildInputs = [ SDL2 SDL2_net ];
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/bin
|
|
ln -s $out/games/Maelstrom/Maelstrom $out/bin/maelstrom
|
|
'';
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = "maelstrom";
|
|
exec = "maelstrom";
|
|
desktopName = "Maelstrom";
|
|
genericName = "Maelstrom";
|
|
comment = "An arcade-style game resembling Asteroids";
|
|
categories = [ "Game" ];
|
|
})
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Arcade-style game resembling Asteroids";
|
|
mainProgram = "maelstrom";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ tmountain ];
|
|
};
|
|
}
|