nixpkgs/pkgs/by-name/in/infra-arcana/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

51 lines
1.5 KiB
Nix

{ lib, stdenv, fetchFromGitLab, cmake, makeWrapper, SDL2, SDL2_image, SDL2_mixer
}:
stdenv.mkDerivation rec {
pname = "infra-arcana";
version = "22.1.0";
src = fetchFromGitLab {
owner = "martin-tornqvist";
repo = "ia";
rev = "v${version}";
hash = "sha256-MI+wH0+1f41JYXT2hzDs3RrrR3eTfOzgtCa5T6m8oQc=";
};
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ SDL2 SDL2_image SDL2_mixer ];
installPhase = ''
runHook preInstall
mkdir -p $out/{opt/ia,bin}
# Remove build artifacts
rm -rf CMake* cmake* compile_commands.json CTest* Makefile
cp -ra * $out/opt/ia
# IA uses relative paths when looking for assets
wrapProgram $out/opt/ia/ia --run "cd $out/opt/ia"
ln -s $out/opt/ia/ia $out/bin/infra-arcana
runHook postInstall
'';
meta = with lib; {
homepage = "https://sites.google.com/site/infraarcana";
description = "Lovecraftian single-player roguelike game";
mainProgram = "infra-arcana";
longDescription = ''
Infra Arcana is a Roguelike set in the early 20th century. The goal is to
explore the lair of a dreaded cult called The Church of Starry Wisdom.
Buried deep beneath their hallowed grounds lies an artifact called The
Shining Trapezohedron - a window to all secrets of the universe. Your
ultimate goal is to unearth this artifact.
'';
platforms = platforms.linux;
maintainers = [ maintainers.kenran ];
license = licenses.agpl3Plus;
};
}