2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2021-03-27 17:54:47 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
}:
|
2018-08-26 00:23:32 +00:00
|
|
|
|
2021-03-27 17:54:47 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2018-08-26 00:23:32 +00:00
|
|
|
pname = "20kly";
|
2021-03-27 17:54:47 +00:00
|
|
|
version = "1.5.0";
|
|
|
|
|
2018-08-26 00:23:32 +00:00
|
|
|
format = "other";
|
|
|
|
|
2021-03-27 17:54:47 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "20kly";
|
|
|
|
repo = "20kly";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1zxsxg49a02k7zidx3kgk2maa0vv0n1f9wrl5vch07sq3ghvpphx";
|
2018-08-26 00:23:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace lightyears \
|
|
|
|
--replace \
|
|
|
|
"LIGHTYEARS_DIR = \".\"" \
|
|
|
|
"LIGHTYEARS_DIR = \"$out/share\""
|
|
|
|
'';
|
|
|
|
|
2021-03-27 17:54:47 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
pygame
|
|
|
|
];
|
2018-08-26 00:23:32 +00:00
|
|
|
|
2021-03-27 17:54:47 +00:00
|
|
|
buildPhase = ''
|
|
|
|
python -O -m compileall .
|
|
|
|
'';
|
2018-08-26 00:23:32 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/share"
|
2021-03-27 17:54:47 +00:00
|
|
|
cp -r data lib20k lightyears "$out/share"
|
2018-08-26 00:23:32 +00:00
|
|
|
install -Dm755 lightyears "$out/bin/lightyears"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-08-26 00:23:32 +00:00
|
|
|
description = "A steampunk-themed strategy game where you have to manage a steam supply network";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://jwhitham.org.uk/20kly/";
|
2021-03-27 17:54:47 +00:00
|
|
|
license = licenses.gpl2Only;
|
2018-08-26 00:23:32 +00:00
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
};
|
|
|
|
}
|