Files
nixpkgs/pkgs/by-name/co/countryguess/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

49 lines
1.1 KiB
Nix

{
lib,
python3Packages,
fetchFromGitHub,
makeWrapper,
}:
python3Packages.buildPythonApplication {
pname = "countryguess";
version = "0-unstable-2025-03-04";
# upstream pyproject.toml is nonsense. Copied from another project
# without customizing it for this project.
format = "other";
src = fetchFromGitHub {
owner = "swarbler";
repo = "countryguess";
rev = "28f45231bc3d8bedeb7d1b51d56ca1b56796ff8c";
hash = "sha256-S/fy94aRoVI2CvICrviQ2ZgVESWYLuREb5mwsfXL6Hc=";
};
dependencies = with python3Packages; [
art
colorama
];
# upstream python file lacks shebang
postPatch = ''
echo '#!/usr/bin/env python3' | cat - countryguess.py > temp && mv temp countryguess.py
'';
installPhase = ''
runHook preInstall
install -Dm744 countryguess.py $out/bin/countryguess
runHook postInstall
'';
meta = {
description = "Guess the 193 U.N. recognised countries";
homepage = "https://github.com/swarbler/countryguess";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ ethancedwards8 ];
mainProgram = "countryguess";
};
}