mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
48 lines
1.0 KiB
Nix
48 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";
|
|
rev = "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 = with lib; {
|
|
description = "Steampunk-themed strategy game where you have to manage a steam supply network";
|
|
mainProgram = "lightyears";
|
|
homepage = "http://jwhitham.org.uk/20kly/";
|
|
license = licenses.gpl2Only;
|
|
maintainers = with maintainers; [ fgaz ];
|
|
};
|
|
}
|