From 086de34bbd3180ba72c2e4a8f1db1235f187fc98 Mon Sep 17 00:00:00 2001 From: liberodark Date: Thu, 10 Apr 2025 13:34:09 +0200 Subject: [PATCH 1/3] peertube: 7.0.1 -> 7.1.1 --- pkgs/by-name/pe/peertube/package.nix | 30 +++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/pe/peertube/package.nix b/pkgs/by-name/pe/peertube/package.nix index c80bc03c2ef6..b02f3e746531 100644 --- a/pkgs/by-name/pe/peertube/package.nix +++ b/pkgs/by-name/pe/peertube/package.nix @@ -48,23 +48,23 @@ let in stdenv.mkDerivation rec { pname = "peertube"; - version = "7.0.1"; + version = "7.1.1"; src = fetchFromGitHub { owner = "Chocobozzz"; repo = "PeerTube"; tag = "v${version}"; - hash = "sha256-DoUSzqb8lrU+s5R95rxCN/5A8sgb11edAhv0T6YACRo="; + hash = "sha256-rRga8pR/gfEFyVOkh1xmreM/ZVjiMre316/beCkjJP4="; }; yarnOfflineCacheServer = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; - hash = "sha256-WLaIIyz6SEekLFeVO39Swpny5/x5Jc1zoxy/6bmOXTk="; + hash = "sha256-Z6ACAkgk0RbcqVIjwKlCEZbZH0CHQU9sixJW73VyYDE="; }; yarnOfflineCacheClient = fetchYarnDeps { yarnLock = "${src}/client/yarn.lock"; - hash = "sha256-/ZdORSnwk29ubsgKKB7RfHCetODNOH9DzkflQdDsMz0="; + hash = "sha256-fi1fSxL7EbsjQntnDj2S0WLVZWLcP6nLHXpsM0y5HRs="; }; yarnOfflineCacheAppsCli = fetchYarnDeps { @@ -106,6 +106,26 @@ stdenv.mkDerivation rec { cd ~/client yarn config --offline set yarn-offline-mirror $yarnOfflineCacheClient yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress + + substituteInPlace package.json \ + --replace-fail '"sass-embedded":' '"sass":' + + find node_modules/vite/dist -name "*.js" -type f -exec grep -l "sass-embedded" {} \; | while read file; do + echo "Patching $file" + sed -i 's/"sass-embedded"/"sass"/g; s/'"'"'sass-embedded'"'"'/'"'"'sass'"'"'/g' "$file" + done + + rm -rf node_modules/sass-embedded* + + if [ -L "node_modules/.bin/sass" ]; then + rm node_modules/.bin/sass + ln -s ../sass/sass.js node_modules/.bin/sass + fi + if [ -L "node_modules/vite/node_modules/.bin/sass" ]; then + rm node_modules/vite/node_modules/.bin/sass + ln -s ../../../sass/sass.js node_modules/vite/node_modules/.bin/sass + fi + cd ~/apps/peertube-cli yarn config --offline set yarn-offline-mirror $yarnOfflineCacheAppsCli yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress @@ -174,7 +194,7 @@ stdenv.mkDerivation rec { # be needed, either now or in the future. If they might be, then we probably want # to move the package to $out above instead of removing the broken symlink. rm $out/node_modules/@peertube/{peertube-server,peertube-transcription-devtools,peertube-types-generator,tests} - rm $out/client/node_modules/@peertube/{peertube-transcription-devtools,peertube-types-generator,tests} + rm $out/client/node_modules/@peertube/{peertube-transcription-devtools,peertube-types-generator,tests,player} mkdir -p $cli/bin mv ~/apps/peertube-cli/{dist,node_modules,package.json,yarn.lock} $cli From 481a3f2549ecbd910ca0273e47c46b3bdc6dc171 Mon Sep 17 00:00:00 2001 From: liberodark Date: Tue, 3 Jun 2025 16:31:52 +0200 Subject: [PATCH 2/3] nixos/peertube: fix crash when import video --- nixos/modules/services/web-apps/peertube.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix index b2ae9d3374e1..2a676fd06673 100644 --- a/nixos/modules/services/web-apps/peertube.nix +++ b/nixos/modules/services/web-apps/peertube.nix @@ -34,6 +34,7 @@ let "@obsolete" "@privileged" "@setuid" + "@spawn" ]; cfgService = { From 24040eb0f278b2c0004b6b7ed5bdd220e3716057 Mon Sep 17 00:00:00 2001 From: liberodark Date: Thu, 5 Jun 2025 07:00:49 +0200 Subject: [PATCH 3/3] peertube: 7.1.1 -> 7.2.1 --- pkgs/by-name/pe/peertube/package.nix | 31 ++++++++-------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/pe/peertube/package.nix b/pkgs/by-name/pe/peertube/package.nix index b02f3e746531..af3bbedf6832 100644 --- a/pkgs/by-name/pe/peertube/package.nix +++ b/pkgs/by-name/pe/peertube/package.nix @@ -48,23 +48,23 @@ let in stdenv.mkDerivation rec { pname = "peertube"; - version = "7.1.1"; + version = "7.2.1"; src = fetchFromGitHub { owner = "Chocobozzz"; repo = "PeerTube"; tag = "v${version}"; - hash = "sha256-rRga8pR/gfEFyVOkh1xmreM/ZVjiMre316/beCkjJP4="; + hash = "sha256-I53LCCtB8iNGuABgvhRjUfxocasXCv4TV7jXtHVpMnU="; }; yarnOfflineCacheServer = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; - hash = "sha256-Z6ACAkgk0RbcqVIjwKlCEZbZH0CHQU9sixJW73VyYDE="; + hash = "sha256-PMU6ZMcT+9Z3Y6+085e3hRnvs4Xii5FIkkOPvsltfMY="; }; yarnOfflineCacheClient = fetchYarnDeps { yarnLock = "${src}/client/yarn.lock"; - hash = "sha256-fi1fSxL7EbsjQntnDj2S0WLVZWLcP6nLHXpsM0y5HRs="; + hash = "sha256-AWUnxC/cwtKCa70MKmHeOr6ussMYyQ5awQAnWYzCA1s="; }; yarnOfflineCacheAppsCli = fetchYarnDeps { @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { yarnOfflineCacheAppsRunner = fetchYarnDeps { yarnLock = "${src}/apps/peertube-runner/yarn.lock"; - hash = "sha256-R7oXJUT698l2D1WkQGTWfkmbC7bC1XJ04xT0O8bwuI8="; + hash = "sha256-t7H0VNLM48sTfctD9V2CFdi/0JRETu5cj/dBy6aNFW8="; }; outputs = [ @@ -107,25 +107,12 @@ stdenv.mkDerivation rec { yarn config --offline set yarn-offline-mirror $yarnOfflineCacheClient yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress - substituteInPlace package.json \ - --replace-fail '"sass-embedded":' '"sass":' - + # Switch sass-embedded to sass find node_modules/vite/dist -name "*.js" -type f -exec grep -l "sass-embedded" {} \; | while read file; do echo "Patching $file" sed -i 's/"sass-embedded"/"sass"/g; s/'"'"'sass-embedded'"'"'/'"'"'sass'"'"'/g' "$file" done - rm -rf node_modules/sass-embedded* - - if [ -L "node_modules/.bin/sass" ]; then - rm node_modules/.bin/sass - ln -s ../sass/sass.js node_modules/.bin/sass - fi - if [ -L "node_modules/vite/node_modules/.bin/sass" ]; then - rm node_modules/vite/node_modules/.bin/sass - ln -s ../../../sass/sass.js node_modules/vite/node_modules/.bin/sass - fi - cd ~/apps/peertube-cli yarn config --offline set yarn-offline-mirror $yarnOfflineCacheAppsCli yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress @@ -213,7 +200,7 @@ stdenv.mkDerivation rec { passthru.tests.peertube = nixosTests.peertube; - meta = with lib; { + meta = { description = "Free software to take back control of your videos"; longDescription = '' PeerTube aspires to be a decentralized and free/libre alternative to video @@ -229,7 +216,7 @@ stdenv.mkDerivation rec { though if the administrator of your instance had previously connected it with other instances. ''; - license = licenses.agpl3Plus; + license = lib.licenses.agpl3Plus; homepage = "https://joinpeertube.org/"; platforms = [ "x86_64-linux" @@ -237,7 +224,7 @@ stdenv.mkDerivation rec { # feasible, looking for maintainer to help out # "x86_64-darwin" "aarch64-darwin" ]; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ immae izorkin stevenroose