Advertisement
Guest User

Untitled

a guest
Dec 18th, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. with import <nixpkgs> {};
  2.  
  3. stdenv.mkDerivation rec {
  4. pname = "libtelebot";
  5. version = "4.7.0";
  6.  
  7. src = fetchFromGitHub {
  8. owner = "smartnode";
  9. repo = "telebot";
  10. rev = "ba78cd3aceb1d6c9b4556307c3a37333263cfc5a";
  11. sha256 = "1iwrc229lnyp7mfdn1whghslbbqx6w4xk89b3zafca2qhw9kj2ly";
  12. };
  13.  
  14. buildInputs = [ curlFull json_c binutils gnumake cmake pkgconfig ];
  15.  
  16. buildPhase = ''
  17. mkdir -p Build && cd Build
  18. cmake ..
  19. cd ..
  20. make
  21. '';
  22.  
  23. installPhase = ''
  24. mkdir -p $out/lib
  25. mkdir -p $out/include
  26.  
  27. cp libtelebot_static.a $out/lib
  28. cp libtelebot.so $out/lib
  29. cp $src/include/telebot.h $out/include
  30. cp $src/include/telebot-common.h $out/include
  31. cp $src/include/telebot-core.h $out/include
  32. cp $src/include/telebot-methods.h $out/include
  33. cp $src/include/telebot-parser.h $out/include
  34. cp $src/include/telebot-private.h $out/include
  35. cp $src/include/telebot-stickers.h $out/include
  36. cp $src/include/telebot-types.h $out/include
  37. '';
  38. }
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement