Free and Open-source video streaming suite. https://miracle-tv.live
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.2KB

  1. with import <nixpkgs> {};
  2. let
  3. executableName = "miracle-tv-server";
  4. version = "0.1.0";
  5. # src = fetchgit {
  6. # url = "https://code.gensokyo.social/Gensokyo.social/miracle-tv.git";
  7. # rev = "493c80142637b6fc47c864dfb51a1cba2f391150";
  8. # sha256 = "1a5ih7jbdkkapmih11jk4y95nk6ppvns5lg0aqv76kd9y9c8v26s";
  9. # };
  10. src = ./.;
  11. nodePkg = pkgs.nodejs-12_x;
  12. yarnPkg = pkgs.yarn.override { nodejs = nodePkg; };
  13. in mkYarnPackage rec {
  14. name = "miarcle-tv";
  15. inherit version src nodePkg yarnPkg;
  16. doDist = false;
  17. packageJSON = "${src}/package.json";
  18. yarnLock = "${src}/yarn.lock";
  19. yarnNix = "${src}/yarn.nix";
  20. shellHook = ''
  21. export PATH="$PATH:$PWD/node_modules/.bin"
  22. '';
  23. configurePhase = ''
  24. rm -rf ./node_modules || true
  25. ln -s $node_modules ./node_modules
  26. '';
  27. buildPhase = ''
  28. sh ./bin/buildServer.sh
  29. '';
  30. installPhase = ''
  31. mkdir $out
  32. cp -R ./dist/* $out
  33. cp -R ./migrations $out/migrations
  34. makeWrapper ${nodePkg}/bin/node $out/bin/${executableName} \
  35. --add-flags $out/server/server.js \
  36. --set NODE_PATH $NODE_PATH:$out:$node_modules
  37. '';
  38. distPhase = ''
  39. true
  40. '';
  41. nativeBuildInputs = with pkgs; [
  42. nodePkg yarnPkg makeWrapper
  43. automake autoconf m4 git bash
  44. libpng libGL gcc
  45. ];
  46. }