Guest User

Untitled

a guest
Apr 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. with import <nixpkgs> {};
  2.  
  3. clangStdenv.mkDerivation {
  4. name = "emojicode-0.6";
  5. src = fetchFromGitHub {
  6. owner = "emojicode";
  7. repo = "emojicode";
  8. sha256 = "0v5r481xhjc3kdk9a49yi9lqnd6gxq5iws4d65dcx43mw3wz38sj";
  9. rev = "5d655df6b7f7ffa13c4addfc140ef83d695381ca";
  10. };
  11. buildInputs = [ cmake gcc llvm_5 ncurses.dev ];
  12. patchPhase = ''
  13. sed -i 's/curses/ncurses/' Compiler/CMakeLists.txt
  14. substituteInPlace Compiler/CLI/Options.cpp --replace /usr/local/EmojicodePackages "$out/EmojicodePackages"
  15. substituteInPlace Compiler/Compiler.cpp --replace "cmd << linker_" "cmd << \"${pkgs.gcc}/bin/g++\""
  16. '';
  17. installPhase = ''
  18. mkdir -p $out/bin
  19. mkdir $out/EmojicodePackages
  20. mkdir $out/EmojicodePackages/s
  21. mkdir $out/EmojicodePackages/sockets
  22. mkdir $out/EmojicodePackages/files
  23. mkdir $out/EmojicodePackages/runtime
  24.  
  25. cp Compiler/emojicodec $out/bin/
  26. cp emojicodemig $out/bin/
  27.  
  28. cp s/interface.emojii $out/EmojicodePackages/s
  29. cp s/s.o $out/EmojicodePackages/s
  30. cp s/libs.a $out/EmojicodePackages/s
  31.  
  32. cp sockets/interface.emojii $out/EmojicodePackages/sockets
  33. cp sockets/sockets.o $out/EmojicodePackages/sockets
  34.  
  35. cp files/interface.emojii $out/EmojicodePackages/files
  36. cp files/files.o $out/EmojicodePackages/files
  37.  
  38. cp runtime/libruntime.a $out/EmojicodePackages/runtime
  39. '';
  40. }
Add Comment
Please, Sign In to add comment