countryguess: init at 0-unstable-2025-03-04

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>

+48
+48
pkgs/by-name/co/countryguess/package.nix
··· 1 + { 2 + lib, 3 + python3Packages, 4 + fetchFromGitHub, 5 + makeWrapper, 6 + }: 7 + 8 + python3Packages.buildPythonApplication rec { 9 + pname = "countryguess"; 10 + version = "0-unstable-2025-03-04"; 11 + # upstream pyproject.toml is nonsense. Copied from another project 12 + # without customizing it for this project. 13 + format = "other"; 14 + 15 + src = fetchFromGitHub { 16 + owner = "swarbler"; 17 + repo = "countryguess"; 18 + rev = "28f45231bc3d8bedeb7d1b51d56ca1b56796ff8c"; 19 + hash = "sha256-S/fy94aRoVI2CvICrviQ2ZgVESWYLuREb5mwsfXL6Hc="; 20 + }; 21 + 22 + dependencies = with python3Packages; [ 23 + art 24 + colorama 25 + ]; 26 + 27 + # upstream python file lacks shebang 28 + postPatch = '' 29 + echo '#!/usr/bin/env python3' | cat - countryguess.py > temp && mv temp countryguess.py 30 + ''; 31 + 32 + installPhase = '' 33 + runHook preInstall 34 + 35 + install -Dm744 countryguess.py $out/bin/countryguess 36 + 37 + runHook postInstall 38 + ''; 39 + 40 + meta = { 41 + description = "Guess the 193 U.N. recognised countries"; 42 + homepage = "https://github.com/swarbler/countryguess"; 43 + license = lib.licenses.mit; 44 + platforms = lib.platforms.unix; 45 + maintainers = with lib.maintainers; [ ethancedwards8 ]; 46 + mainProgram = "countryguess"; 47 + }; 48 + }