Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
49 lines
1.0 KiB
Nix
49 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
python3Packages,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "20kly";
|
|
version = "1.5.0";
|
|
|
|
format = "other";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "20kly";
|
|
repo = "20kly";
|
|
tag = "v${version}";
|
|
sha256 = "1zxsxg49a02k7zidx3kgk2maa0vv0n1f9wrl5vch07sq3ghvpphx";
|
|
};
|
|
|
|
patchPhase = ''
|
|
substituteInPlace lightyears \
|
|
--replace \
|
|
"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 ];
|
|
};
|
|
}
|