mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
cowsay: fix cross
The install.sh script looks for all perls in $PATH, tries to execute these to test whether that perl is "good", if it is, takes it and puts it into the shebang. This obviously can't work for cross. As installation seems to be pretty trivial, do it in a custom install phase.
This commit is contained in:
parent
7c73f53d83
commit
fae81f322e
@ -11,8 +11,18 @@ stdenv.mkDerivation rec{
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
postBuild = ''
|
||||
substituteInPlace cowsay --replace "%BANGPERL%" "!${perl}/bin/perl" \
|
||||
--replace "%PREFIX%" "$out"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
bash ./install.sh $out
|
||||
mkdir -p $out/{bin,man/man1,share/cows}
|
||||
install -m755 cowsay $out/bin/cowsay
|
||||
ln -s cowsay $out/bin/cowthink
|
||||
install -m644 cowsay.1 $out/man/man1/cowsay.1
|
||||
ln -s cowsay.1 $out/man/man1/cowthink.1
|
||||
install -m644 cows/* -t $out/share/cows/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user