nixpkgs-suyu/pkgs/games/20kly/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1 KiB
Nix
Raw Permalink Normal View History

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