2013-08-10 01:21:25 +02:00
|
|
|
{ stdenv, fetchurl, python3, texinfo, makeWrapper }:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2018-02-27 19:07:57 +01:00
|
|
|
name = "ponysay-3.0.3";
|
2013-08-10 01:21:25 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-02-27 19:07:57 +01:00
|
|
|
url = "https://github.com/erkin/ponysay/archive/3.0.3.tar.gz";
|
|
|
|
sha256 = "12mjabf5cpp5dgg63s19rlyq3dhhpzzy2sa439yncqzsk7rdg0n3";
|
2013-08-10 01:21:25 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ python3 texinfo makeWrapper ];
|
|
|
|
|
2013-08-12 19:41:37 +02:00
|
|
|
inherit python3;
|
2013-08-10 01:21:25 +02:00
|
|
|
|
2013-08-12 19:41:37 +02:00
|
|
|
phases = "unpackPhase installPhase fixupPhase";
|
2013-08-10 01:21:25 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2013-08-12 19:41:37 +02: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-10 01:21:25 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Cowsay reimplemention for ponies";
|
2017-08-22 20:50:04 +02:00
|
|
|
homepage = http://erkin.co/ponysay/;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2013-08-12 19:41:37 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ bodil ];
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = with stdenv.lib.platforms; unix;
|
2013-08-10 01:21:25 +02:00
|
|
|
};
|
|
|
|
}
|