mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
49 lines
1.0 KiB
Nix
49 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
python3Packages,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication (finalAttrs: {
|
|
pname = "20kly";
|
|
version = "1.5.2";
|
|
|
|
pyproject = false;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "20kly";
|
|
repo = "20kly";
|
|
tag = "v${finalAttrs.version}";
|
|
sha256 = "sha256-7i1tHylnXWlTvfu9CbStTcA0qsFFqQcGX6bUUTUcYBw=";
|
|
};
|
|
|
|
patchPhase = ''
|
|
substituteInPlace lightyears \
|
|
--replace-fail \
|
|
"LIGHTYEARS_DIR = \".\"" \
|
|
"LIGHTYEARS_DIR = \"$out/share\""
|
|
'';
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
pygame
|
|
];
|
|
|
|
buildPhase = ''
|
|
python -O -m compileall .
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p "$out/share"
|
|
cp -r data lib20k lightyears "$out/share"
|
|
install -Dm755 lightyears "$out/bin/lightyears"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Steampunk-themed strategy game where you have to manage a steam supply network";
|
|
mainProgram = "lightyears";
|
|
homepage = "http://jwhitham.org.uk/20kly/";
|
|
license = lib.licenses.gpl2Only;
|
|
maintainers = with lib.maintainers; [ fgaz ];
|
|
};
|
|
})
|