diff options
author | Bodil Stokke <bodil@bodil.org> | 2013-08-12 19:41:37 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2013-08-18 18:23:35 +0200 |
commit | de462dcae2306eb943a0de78d0de7e9505ea16f5 (patch) | |
tree | f3654a08672416d72d1495e2411cff15a0846c64 /pkgs/tools/misc/ponysay/default.nix | |
parent | d6b4ed9e3cfc2d8988f1aedfb5abd9d5291b02fc (diff) |
Cleaned up ponysay build, and added maintainer metadata.
Diffstat (limited to 'pkgs/tools/misc/ponysay/default.nix')
-rw-r--r-- | pkgs/tools/misc/ponysay/default.nix | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/pkgs/tools/misc/ponysay/default.nix b/pkgs/tools/misc/ponysay/default.nix index 1f281a713011c..17be93dda8f7e 100644 --- a/pkgs/tools/misc/ponysay/default.nix +++ b/pkgs/tools/misc/ponysay/default.nix @@ -10,21 +10,24 @@ stdenv.mkDerivation rec { buildInputs = [ python3 texinfo makeWrapper ]; - phases = "unpackPhase patchPhase installPhase"; + inherit python3; - patches = [ ./pathfix.patch ]; + phases = "unpackPhase installPhase fixupPhase"; installPhase = '' - python3 setup.py --prefix=$out --freedom=partial install --with-shared-cache=$out/share/ponysay - for i in $(cd $out/bin && ls); do - wrapProgram $out/bin/$i \ - --prefix PYTHONPATH : "$(toPythonPath $out):$PYTHONPATH" - done + 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 ''; meta = { description = "cowsay reimplemention for ponies."; homepage = http://terse.tk/ponysay/; license = "GPLv3"; + maintainers = with stdenv.lib.maintainers; [ bodil ]; }; } |