From aa915382e9bf8564b75de46079b4c94907de6445 Mon Sep 17 00:00:00 2001 From: Grace Lovelace Date: Wed, 29 May 2024 14:29:31 -0700 Subject: [PATCH] (ponysay): Add missing pre and post install hooks Noticed my postInstall overrides weren't working, so I added them. --- pkgs/tools/misc/ponysay/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/misc/ponysay/default.nix b/pkgs/tools/misc/ponysay/default.nix index 2fb48f05850e..0b374e1efba1 100644 --- a/pkgs/tools/misc/ponysay/default.nix +++ b/pkgs/tools/misc/ponysay/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { inherit python3; installPhase = '' + runHook preInstall + 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'))" \ @@ -24,6 +26,8 @@ stdenv.mkDerivation rec { python3 setup.py --prefix=$out --freedom=partial install \ --with-shared-cache=$out/share/ponysay \ --with-bash + + runHook postInstall ''; meta = with lib; {