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.
62 lines
1.4 KiB
Nix
62 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitLab
|
|
, SDL2
|
|
, SDL2_image
|
|
, pkg-config
|
|
, libvorbis
|
|
, libGL
|
|
, boost
|
|
, cmake
|
|
, zlib
|
|
, curl
|
|
, SDL2_mixer
|
|
, SDL2_ttf
|
|
, python3
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "commandergenius";
|
|
version = "3.5.1";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "Dringgstein";
|
|
repo = "Commander-Genius";
|
|
rev = "v${version}";
|
|
hash = "sha256-sWnx2UdnuuLcTxhuXhfG2ssnFvuGi9kOBrpc4jiKgTs=";
|
|
};
|
|
|
|
buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf libGL boost libvorbis zlib curl python3 ];
|
|
|
|
cmakeFlags = [
|
|
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
|
|
"-DSHAREDIR=${placeholder "out"}/share"
|
|
];
|
|
|
|
makeFlags = [
|
|
"DESTDIR=${placeholder "out"}"
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
postPatch = ''
|
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(sdl2-config --cflags)"
|
|
sed -i 's,APPDIR games,APPDIR bin,' src/install.cmake
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Modern Interpreter for the Commander Keen Games";
|
|
longDescription = ''
|
|
Commander Genius is an open-source clone of
|
|
Commander Keen which allows you to play
|
|
the games, and some of the mods
|
|
made for it. All of the original data files
|
|
are required to do so
|
|
'';
|
|
homepage = "https://github.com/gerstrong/Commander-Genius";
|
|
maintainers = with maintainers; [ hce ];
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|