Cleaned up ponysay build, and added maintainer metadata.
This commit is contained in:
parent
d6b4ed9e3c
commit
de462dcae2
@ -16,6 +16,7 @@
|
|||||||
bjg = "Brian Gough <bjg@gnu.org>";
|
bjg = "Brian Gough <bjg@gnu.org>";
|
||||||
bjornfor = "Bjørn Forsman <bjorn.forsman@gmail.com>";
|
bjornfor = "Bjørn Forsman <bjorn.forsman@gmail.com>";
|
||||||
bluescreen303 = "Mathijs Kwik <mathijs@bluescreen303.nl>";
|
bluescreen303 = "Mathijs Kwik <mathijs@bluescreen303.nl>";
|
||||||
|
bodil = "Bodil Stokke <nix@bodil.org>";
|
||||||
chaoflow = "Florian Friesdorf <flo@chaoflow.net>";
|
chaoflow = "Florian Friesdorf <flo@chaoflow.net>";
|
||||||
coconnor = "Corey O'Connor <coreyoconnor@gmail.com>";
|
coconnor = "Corey O'Connor <coreyoconnor@gmail.com>";
|
||||||
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
|
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
|
||||||
|
@ -10,21 +10,24 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ python3 texinfo makeWrapper ];
|
buildInputs = [ python3 texinfo makeWrapper ];
|
||||||
|
|
||||||
phases = "unpackPhase patchPhase installPhase";
|
inherit python3;
|
||||||
|
|
||||||
patches = [ ./pathfix.patch ];
|
phases = "unpackPhase installPhase fixupPhase";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
python3 setup.py --prefix=$out --freedom=partial install --with-shared-cache=$out/share/ponysay
|
find -type f -name "*.py" | xargs sed -i "s@/usr/bin/env python3@$python3/bin/python3@g"
|
||||||
for i in $(cd $out/bin && ls); do
|
substituteInPlace setup.py --replace \
|
||||||
wrapProgram $out/bin/$i \
|
"fileout.write(('#!/usr/bin/env %s\n' % env).encode('utf-8'))" \
|
||||||
--prefix PYTHONPATH : "$(toPythonPath $out):$PYTHONPATH"
|
"fileout.write(('#!%s/bin/%s\n' % (os.environ['python3'], env)).encode('utf-8'))"
|
||||||
done
|
python3 setup.py --prefix=$out --freedom=partial install \
|
||||||
|
--with-shared-cache=$out/share/ponysay \
|
||||||
|
--with-bash
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "cowsay reimplemention for ponies.";
|
description = "cowsay reimplemention for ponies.";
|
||||||
homepage = http://terse.tk/ponysay/;
|
homepage = http://terse.tk/ponysay/;
|
||||||
license = "GPLv3";
|
license = "GPLv3";
|
||||||
|
maintainers = with stdenv.lib.maintainers; [ bodil ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
diff -urN ponysay-3.0.1/setup.py ponysay.p/setup.py
|
|
||||||
--- ponysay-3.0.1/setup.py 2013-04-05 14:28:18.000000000 +0200
|
|
||||||
+++ ponysay.p/setup.py 2013-08-10 01:09:30.181043877 +0200
|
|
||||||
@@ -514,7 +514,7 @@
|
|
||||||
for command in commands:
|
|
||||||
sourceed = 'completion/ponysay.%s' % (command)
|
|
||||||
generated = 'completion/%s-completion.%s' % (shell, command)
|
|
||||||
- generatorcmd = './completion/auto-auto-complete.py %s --output %s --source %s' % (shell, generated, sourceed)
|
|
||||||
+ generatorcmd = 'python3 completion/auto-auto-complete.py %s --output %s --source %s' % (shell, generated, sourceed)
|
|
||||||
Popen(generatorcmd.split(' ')).communicate()
|
|
||||||
if conf[command] is not None:
|
|
||||||
dest = generated + '.install'
|
|
||||||
@@ -559,9 +559,9 @@
|
|
||||||
for toolcommand in ('--dimensions', '--metadata'):
|
|
||||||
if not self.free:
|
|
||||||
print('%s, %s, %s' % ('./src/ponysaytool.py', toolcommand, sharedir))
|
|
||||||
- Popen(['./src/ponysaytool.py', toolcommand, sharedir], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
|
|
||||||
+ Popen(['python3', './src/ponysaytool.py', toolcommand, sharedir], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
|
|
||||||
else:
|
|
||||||
- params = ['./src/ponysaytool.py', toolcommand, sharedir, '--']
|
|
||||||
+ params = ['python3', './src/ponysaytool.py', toolcommand, sharedir, '--']
|
|
||||||
for sharefile in os.listdir(sharedir):
|
|
||||||
if sharefile.endswith('.pony') and (sharefile != '.pony'):
|
|
||||||
if not Setup.validateFreedom(sharedir + '/' + sharefile):
|
|
Loading…
Reference in New Issue
Block a user