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.
 
 
 
 

55 lines
1.3 KiB

with import <nixpkgs> {};
let
executableName = "miracle-tv-server";
version = "0.1.0";
# src = fetchgit {
# url = "https://code.gensokyo.social/Gensokyo.social/miracle-tv.git";
# rev = "493c80142637b6fc47c864dfb51a1cba2f391150";
# sha256 = "1a5ih7jbdkkapmih11jk4y95nk6ppvns5lg0aqv76kd9y9c8v26s";
# };
src = ./.;
nodePkg = pkgs.nodejs-12_x;
yarnPkg = pkgs.yarn.override { nodejs = nodePkg; };
in mkYarnPackage rec {
name = "miarcle-tv";
inherit version src nodePkg yarnPkg;
doDist = false;
packageJSON = "${src}/package.json";
yarnLock = "${src}/yarn.lock";
yarnNix = "${src}/yarn.nix";
shellHook = ''
export PATH="$PATH:$PWD/node_modules/.bin"
'';
configurePhase = ''
rm -rf ./node_modules || true
ln -s $node_modules ./node_modules
'';
buildPhase = ''
sh ./bin/buildServer.sh
'';
installPhase = ''
mkdir $out
cp -R ./dist/* $out
cp -R ./migrations $out/migrations
makeWrapper ${nodePkg}/bin/node $out/bin/${executableName} \
--add-flags $out/server/server.js \
--set NODE_PATH $NODE_PATH:$out:$node_modules
'';
distPhase = ''
true
'';
nativeBuildInputs = with pkgs; [
nodePkg yarnPkg makeWrapper
automake autoconf m4 git bash
libpng libGL gcc
];
}