telegram-cli: keep arguments passed to the wrapper

Also break long lines
This commit is contained in:
rnhmjoj 2015-08-28 20:36:46 +00:00
parent 6dab6ed76b
commit 721dc51640

View file

@ -1,5 +1,5 @@
{ stdenv, fetchgit, libconfig, lua5_2, openssl, readline, zlib { stdenv, fetchgit, bash, libconfig, libevent, openssl,
, libevent, pkgconfig, python, jansson, bash readline, zlib, lua5_2, python, pkgconfig, jansson
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -11,14 +11,17 @@ stdenv.mkDerivation rec {
rev = "2052f4b381337d75e783facdbfad56b04dec1a9c"; rev = "2052f4b381337d75e783facdbfad56b04dec1a9c";
}; };
buildInputs = [ libconfig lua5_2 openssl readline zlib libevent pkgconfig python jansson ]; buildInputs = [
libconfig libevent openssl readline zlib
lua5_2 python pkgconfig jansson
];
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp ./bin/telegram-cli $out/bin/telegram-wo-key cp ./bin/telegram-cli $out/bin/telegram-wo-key
cp ./tg-server.pub $out/ cp ./tg-server.pub $out/
cat > $out/bin/telegram-cli <<EOF cat > $out/bin/telegram-cli <<EOF
#!${bash}/bin/sh #!${bash}/bin/sh
$out/bin/telegram-wo-key -k $out/tg-server.pub $out/bin/telegram-wo-key -k $out/tg-server.pub "\$@"
EOF EOF
chmod +x $out/bin/telegram-cli chmod +x $out/bin/telegram-cli
''; '';