misskey update
This commit is contained in:
parent
92517c7c53
commit
9e743d18ca
|
@ -153,11 +153,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1668923022,
|
||||
"narHash": "sha256-95GW/QXMczzMZ0wSz/rRGQwi2nx5BVi0qSI6aGG4OrY=",
|
||||
"lastModified": 1668947373,
|
||||
"narHash": "sha256-w23XqGmDtMKr7qKc2D6A6Rfo+7xYtbloPtPod+BopQk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "43fd9acff9fe06264ff2c045ec95cb3078c80352",
|
||||
"rev": "9ee49e01512c3ce211e8017f0ba592ef4695d777",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -17,7 +17,7 @@ let
|
|||
stdenv
|
||||
];
|
||||
|
||||
misskeyPackage = pkgs.callPackage ./misskey-pkg.nix { };
|
||||
misskeyPackage = pkgs.misskey-static;
|
||||
|
||||
misskeyConfig = {
|
||||
url = "https://${misskeyDomain}/";
|
||||
|
|
|
@ -7,4 +7,5 @@ final: prev: {
|
|||
lsquic = final.callPackage ./invidious/lsquic.nix { };
|
||||
videojs = final.callPackage ./invidious/videojs.nix { };
|
||||
};
|
||||
misskey-static = final.callPackage ./misskey {};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
version = "12.119.0";
|
||||
meta = builtins.fromJSON (builtins.readFile ./meta.json);
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "misskey-dev";
|
||||
repo = "misskey";
|
||||
rev = version;
|
||||
sha256 = "sha256-2ijgk9/BWndJva71XTDfnLM7oG5qFVYhwxOXUK7UA6s=";
|
||||
rev = meta.rev;
|
||||
sha256 = meta.sha256;
|
||||
};
|
||||
in stdenv.mkDerivation {
|
||||
pname = "misskey";
|
4
overlay/misskey/meta.json
Normal file
4
overlay/misskey/meta.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"rev": "12.119.0",
|
||||
"sha256": "sha256-2ijgk9/BWndJva71XTDfnLM7oG5qFVYhwxOXUK7UA6s="
|
||||
}
|
26
overlay/misskey/update.sh
Executable file
26
overlay/misskey/update.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq git moreutils nix nix-prefetch
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
|
||||
json_get() {
|
||||
jq -r "$1" < 'meta.json'
|
||||
}
|
||||
|
||||
json_set() {
|
||||
jq --arg x "$2" "$1 = \$x" < 'meta.json' | sponge 'meta.json'
|
||||
}
|
||||
|
||||
old_rev=$(json_get '.rev')
|
||||
new_rev=$(curl -L "https://api.github.com/repos/misskey-dev/misskey/releases" | jq ".[0].tag_name" -r)
|
||||
|
||||
if [ "$new_rev" = "$old_rev" ]; then
|
||||
echo "misskey is up-to-date."
|
||||
exit
|
||||
fi
|
||||
|
||||
json_set '.rev' "$new_rev"
|
||||
new_sha256=$(nix-prefetch fetchFromGitHub --owner misskey-dev --repo misskey --rev "$new_rev")
|
||||
json_set '.sha256' "$new_sha256"
|
|
@ -4,4 +4,5 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|||
REPO_ROOT="${SCRIPT_DIR}/.."
|
||||
cd $REPO_ROOT
|
||||
./overlay/invidious/update.sh
|
||||
./overlay/misskey/update.sh
|
||||
nix flake update
|
||||
|
|
Loading…
Reference in a new issue