sharedown: 5.3.6 -> 5.3.6-unstable-2025-10-29 (#465846)
This commit is contained in:
@@ -17,15 +17,22 @@
|
||||
chromium,
|
||||
}:
|
||||
|
||||
let
|
||||
yarnLock = ./yarn.lock;
|
||||
offlineCache = fetchYarnDeps {
|
||||
inherit yarnLock;
|
||||
hash = "sha256-MRCrBvqDpPpwMg4A50RVKGp4GqRHNjNJzSpJz+14OG4=";
|
||||
};
|
||||
in
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "Sharedown";
|
||||
version = "5.3.6";
|
||||
version = "5.3.6-unstable-2025-12-06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kylon";
|
||||
repo = "Sharedown";
|
||||
tag = version;
|
||||
hash = "sha256-5t/71T/eBg4vkDZTj7mtCkXhS+AuiVhBmx0Zzrry5Lg=";
|
||||
rev = "c39f0c5bbf694c2cdfce4ef0b4381342fb535ecc";
|
||||
hash = "sha256-PsfE7v9yEeGC8rUzhj/klhqtKKzxCV+thwLnQlgfDxI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -58,7 +65,12 @@ stdenvNoCC.mkDerivation rec {
|
||||
|
||||
modules = yarn2nix-moretea.mkYarnModules rec {
|
||||
name = "Sharedown-modules-${version}";
|
||||
inherit pname version;
|
||||
inherit
|
||||
pname
|
||||
version
|
||||
offlineCache
|
||||
yarnLock
|
||||
;
|
||||
|
||||
yarnFlags = [ "--production" ];
|
||||
|
||||
@@ -93,12 +105,6 @@ stdenvNoCC.mkDerivation rec {
|
||||
'';
|
||||
|
||||
packageJSON = "${src}/package.json";
|
||||
yarnLock = ./yarn.lock;
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
inherit yarnLock;
|
||||
hash = "sha256-9Mdn18jJTXyAVQMGl9ImIEbzlkK6walPrgkGzupLPFQ=";
|
||||
};
|
||||
};
|
||||
in
|
||||
''
|
||||
@@ -121,7 +127,10 @@ stdenvNoCC.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
passthru = {
|
||||
inherit offlineCache;
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Application to save your Sharepoint videos for offline usage";
|
||||
|
||||
@@ -1,24 +1,28 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts curl jq yarn yarn2nix-moretea.yarn2nix nodejs
|
||||
#!nix-shell -i bash -p common-updater-scripts curl gnugrep jq yarn yarn2nix-moretea.yarn2nix nix-update nodejs
|
||||
# See git history for the version of this script that updated to tagged versions.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL "https://api.github.com/repos/kylon/Sharedown/releases/latest" | jq -r '.tag_name')
|
||||
currentVersion=$(nix-instantiate --eval --expr 'with import ./. {}; sharedown.version' | tr -d '"')
|
||||
nixpkgsDir="$PWD"
|
||||
|
||||
if [[ "$currentVersion" == "$latestVersion" && "${BUMP_LOCK-}" != "1" ]]; then
|
||||
currentRev=$(nix-instantiate --eval --expr 'with import ./. {}; sharedown.src.rev' | tr -d '"')
|
||||
nix-update --version=branch --src-only sharedown
|
||||
|
||||
latestRev=$(nix-instantiate --eval --expr 'with import ./. {}; sharedown.src.rev' | tr -d '"')
|
||||
dirname="$(realpath "$(dirname "$0")")"
|
||||
sourceDir="$(nix-build -A sharedown.src --no-out-link)"
|
||||
tempDir="$(mktemp -d)"
|
||||
trap 'chmod -R u+w $tempDir && rm -rf $tempDir' EXIT
|
||||
|
||||
if [[ "$currentRev" == "$latestRev" && "${BUMP_LOCK-}" != "1" ]]; then
|
||||
# Skip update when already on the latest version.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
update-source-version sharedown "$latestVersion"
|
||||
|
||||
dirname="$(realpath "$(dirname "$0")")"
|
||||
sourceDir="$(nix-build -A sharedown.src --no-out-link)"
|
||||
tempDir="$(mktemp -d)"
|
||||
|
||||
cp -r "$sourceDir"/* "$tempDir"
|
||||
cd "$tempDir"
|
||||
PUPPETEER_SKIP_DOWNLOAD=1 yarn install
|
||||
yarn2nix >"$dirname/yarndeps.nix"
|
||||
cp -r yarn.lock "$dirname"
|
||||
PUPPETEER_SKIP_DOWNLOAD=1 yarn install --mode update-lockfile
|
||||
cp yarn.lock "$dirname"
|
||||
cd "$nixpkgsDir"
|
||||
update-source-version sharedown --ignore-same-version --source-key=offlineCache
|
||||
|
||||
+545
-603
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user