From 1a173c89426ab705aac55872740362bc1a0b6cfd Mon Sep 17 00:00:00 2001 From: enc0urage <127197575+enc0urage@users.noreply.github.com> Date: Sat, 25 Mar 2023 11:05:23 +0000 Subject: [PATCH] cowsay: add COWPATH wrapper --- pkgs/tools/misc/cowsay/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/cowsay/default.nix b/pkgs/tools/misc/cowsay/default.nix index 87457e0a63d..62ae9994fff 100644 --- a/pkgs/tools/misc/cowsay/default.nix +++ b/pkgs/tools/misc/cowsay/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, perl, fetchFromGitHub, fetchpatch, nix-update-script, testers, cowsay }: +{ lib, stdenv, perl, fetchFromGitHub, fetchpatch, makeWrapper, nix-update-script, testers, cowsay }: stdenv.mkDerivation rec { pname = "cowsay"; @@ -22,8 +22,14 @@ stdenv.mkDerivation rec { }) ]; + nativeBuildInputs = [ makeWrapper ]; buildInputs = [ perl ]; + postInstall = '' + wrapProgram $out/bin/cowsay \ + --suffix COWPATH : $out/share/cowsay/cows + ''; + makeFlags = [ "prefix=${placeholder "out"}" ];