Files
nixpkgs/pkgs/by-name/po/ponysay/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

54 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
python3,
texinfo,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "ponysay";
version = "unstable-2021-03-27";
src = fetchFromGitHub {
owner = "erkin";
repo = "ponysay";
rev = "8a2c71416e70e4e7b0931917ebfd6479f51ddf9a";
sha256 = "sha256-LNc83E+7NFYYILORElNlYC7arQKGUJHv6phu+vM5xpQ=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
python3
texinfo
];
inherit python3;
installPhase = ''
runHook preInstall
find -type f -name "*.py" | xargs sed -i "s@/usr/bin/env python3@$python3/bin/python3@g"
substituteInPlace setup.py --replace \
"fileout.write(('#!/usr/bin/env %s\n' % env).encode('utf-8'))" \
"fileout.write(('#!%s/bin/%s\n' % (os.environ['python3'], env)).encode('utf-8'))"
substituteInPlace src/balloon.py --replace-fail \
$'\'\'\'\n Constructor' \
$'r\'\'\'\n Constructor'
python3 setup.py --prefix=$out --freedom=partial install \
--with-shared-cache=$out/share/ponysay \
--with-bash
runHook postInstall
'';
meta = with lib; {
description = "Cowsay reimplemention for ponies";
homepage = "https://github.com/erkin/ponysay";
license = licenses.gpl3;
maintainers = with maintainers; [ bodil ];
platforms = platforms.unix;
};
}