3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/games/20kly/default.nix

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

47 lines
1,005 B
Nix
Raw Normal View History

{ lib
2021-03-27 17:54:47 +00:00
, fetchFromGitHub
, python3Packages
}:
2018-08-26 01:23:32 +01:00
2021-03-27 17:54:47 +00:00
python3Packages.buildPythonApplication rec {
2018-08-26 01:23:32 +01:00
pname = "20kly";
2021-03-27 17:54:47 +00:00
version = "1.5.0";
2018-08-26 01:23:32 +01: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 01:23:32 +01: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 01:23:32 +01:00
2021-03-27 17:54:47 +00:00
buildPhase = ''
python -O -m compileall .
'';
2018-08-26 01:23:32 +01:00
installPhase = ''
mkdir -p "$out/share"
2021-03-27 17:54:47 +00:00
cp -r data lib20k lightyears "$out/share"
2018-08-26 01:23:32 +01:00
install -Dm755 lightyears "$out/bin/lightyears"
'';
meta = with lib; {
2018-08-26 01:23:32 +01:00
description = "A steampunk-themed strategy game where you have to manage a steam supply network";
homepage = "http://jwhitham.org.uk/20kly/";
2021-03-27 17:54:47 +00:00
license = licenses.gpl2Only;
2018-08-26 01:23:32 +01:00
maintainers = with maintainers; [ fgaz ];
};
}