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.2 KiB

  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 = "48f9d5aa30f0b1b29e44350307e63b009fc81996";
  8. # sha256 = "0yskcp63r3fcsv4my1f6z2262zk0cqb72k1qn04rwwz9s6ilzbr1";
  9. # };
  10. src = ./.;
  11. nodePkg = pkgs.nodejs-14_x;
  12. yarnPkg = pkgs.yarn.override { nodejs = nodePkg; };
  13. in mkYarnPackage rec {
  14. name = "miarcle-tv";
  15. inherit version src;
  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. makeWrapper ${nodePkg}/bin/node $out/bin/${executableName} \
  34. --add-flags $out/server/server.js \
  35. --set NODE_PATH $NODE_PATH:$out:$node_modules
  36. '';
  37. distPhase = ''
  38. true
  39. '';
  40. nativeBuildInputs = with pkgs; [
  41. nodePkg yarnPkg makeWrapper
  42. yarn2nix
  43. automake autoconf m4 git bash
  44. libpng libGL gcc
  45. ];
  46. }