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