2021-07-20 16:25:24 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, texinfo, makeWrapper }:
|
2013-08-09 23:21:25 +00:00
|
|
|
|
2021-07-20 16:25:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ponysay";
|
|
|
|
version = "3.0.3";
|
2013-08-09 23:21:25 +00:00
|
|
|
|
2021-07-20 16:25:24 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "erkin";
|
|
|
|
repo = "ponysay";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-R2B0TU3ZSEncGsijKgvhaHIbcZa5Dx/jVPxrILBaoVw=";
|
2013-08-09 23:21:25 +00:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-07-20 16:25:24 +00:00
|
|
|
buildInputs = [ python3 texinfo ];
|
2013-08-09 23:21:25 +00:00
|
|
|
|
2013-08-12 17:41:37 +00:00
|
|
|
inherit python3;
|
2013-08-09 23:21:25 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2013-08-12 17:41:37 +00:00
|
|
|
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'))"
|
|
|
|
python3 setup.py --prefix=$out --freedom=partial install \
|
|
|
|
--with-shared-cache=$out/share/ponysay \
|
|
|
|
--with-bash
|
2013-08-09 23:21:25 +00:00
|
|
|
'';
|
|
|
|
|
2021-07-20 16:25:24 +00:00
|
|
|
meta = with lib; {
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Cowsay reimplemention for ponies";
|
2019-12-08 16:50:31 +00:00
|
|
|
homepage = "https://github.com/erkin/ponysay";
|
2021-07-20 16:25:24 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ bodil ];
|
|
|
|
platforms = platforms.unix;
|
2013-08-09 23:21:25 +00:00
|
|
|
};
|
|
|
|
}
|