mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
peertube: add peertube-runnerr utility
This commit is contained in:
parent
6e61227199
commit
1bdbfd5778
|
@ -69,7 +69,12 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-xsB71bnaPn/9/f1KHyU3TTwx+Q+1dLjWmNK2aVJgoRY=";
|
hash = "sha256-xsB71bnaPn/9/f1KHyU3TTwx+Q+1dLjWmNK2aVJgoRY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "cli" ];
|
yarnOfflineCacheAppsRunner = fetchYarnDeps {
|
||||||
|
yarnLock = "${src}/apps/peertube-runner/yarn.lock";
|
||||||
|
hash = "sha256-9w3aLuiLs7SU00YwuE0ixfiD77gCakXT4YeRpfsgGz0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "cli" "runner" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ brotli prefetch-yarn-deps jq which yarn ];
|
nativeBuildInputs = [ brotli prefetch-yarn-deps jq which yarn ];
|
||||||
|
|
||||||
|
@ -81,6 +86,7 @@ stdenv.mkDerivation rec {
|
||||||
fixup-yarn-lock ~/yarn.lock
|
fixup-yarn-lock ~/yarn.lock
|
||||||
fixup-yarn-lock ~/client/yarn.lock
|
fixup-yarn-lock ~/client/yarn.lock
|
||||||
fixup-yarn-lock ~/apps/peertube-cli/yarn.lock
|
fixup-yarn-lock ~/apps/peertube-cli/yarn.lock
|
||||||
|
fixup-yarn-lock ~/apps/peertube-runner/yarn.lock
|
||||||
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheServer
|
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheServer
|
||||||
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||||
cd ~/client
|
cd ~/client
|
||||||
|
@ -89,8 +95,11 @@ stdenv.mkDerivation rec {
|
||||||
cd ~/apps/peertube-cli
|
cd ~/apps/peertube-cli
|
||||||
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheAppsCli
|
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheAppsCli
|
||||||
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||||
|
cd ~/apps/peertube-runner
|
||||||
|
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheAppsRunner
|
||||||
|
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||||
|
|
||||||
patchShebangs ~/{node_modules,client/node_modules,/apps/peertube-cli/node_modules,scripts}
|
patchShebangs ~/{node_modules,client/node_modules,/apps/peertube-cli/node_modules,apps/peertube-runner/node_modules,scripts}
|
||||||
|
|
||||||
# Fix bcrypt node module
|
# Fix bcrypt node module
|
||||||
cd ~/node_modules/bcrypt
|
cd ~/node_modules/bcrypt
|
||||||
|
@ -113,6 +122,10 @@ stdenv.mkDerivation rec {
|
||||||
npm run build:peertube-cli
|
npm run build:peertube-cli
|
||||||
patchShebangs ~/apps/peertube-cli/dist/peertube.js
|
patchShebangs ~/apps/peertube-cli/dist/peertube.js
|
||||||
|
|
||||||
|
# Build PeerTube runner
|
||||||
|
npm run build:peertube-runner
|
||||||
|
patchShebangs ~/apps/peertube-runner/dist/peertube-runner.js
|
||||||
|
|
||||||
# Clean up declaration files
|
# Clean up declaration files
|
||||||
find ~/dist/ \
|
find ~/dist/ \
|
||||||
~/packages/core-utils/dist/ \
|
~/packages/core-utils/dist/ \
|
||||||
|
@ -143,6 +156,10 @@ stdenv.mkDerivation rec {
|
||||||
mv ~/apps/peertube-cli/{dist,node_modules,package.json,yarn.lock} $cli
|
mv ~/apps/peertube-cli/{dist,node_modules,package.json,yarn.lock} $cli
|
||||||
ln -s $cli/dist/peertube.js $cli/bin/peertube-cli
|
ln -s $cli/dist/peertube.js $cli/bin/peertube-cli
|
||||||
|
|
||||||
|
mkdir -p $runner/bin
|
||||||
|
mv ~/apps/peertube-runner/{dist,node_modules,package.json,yarn.lock} $runner
|
||||||
|
ln -s $runner/dist/peertube-runner.js $runner/bin/peertube-runner
|
||||||
|
|
||||||
# Create static gzip and brotli files
|
# Create static gzip and brotli files
|
||||||
find $out/client/dist -type f -regextype posix-extended -iregex '.*\.(css|eot|html|js|json|svg|webmanifest|xlf)' | while read file; do
|
find $out/client/dist -type f -regextype posix-extended -iregex '.*\.(css|eot|html|js|json|svg|webmanifest|xlf)' | while read file; do
|
||||||
gzip -9 -n -c $file > $file.gz
|
gzip -9 -n -c $file > $file.gz
|
||||||
|
|
Loading…
Reference in a new issue