ntfy-sh: 2.5.0 -> 2.6.2
This commit is contained in:
parent
6cee3b5893
commit
467f6548bf
|
@ -1,29 +1,37 @@
|
|||
{ lib, pkgs, stdenv, buildGoModule, fetchFromGitHub, nixosTests
|
||||
, nodejs, debianutils, mkdocs, python3, python3Packages
|
||||
{ lib, pkgs, stdenv, buildGoModule, fetchFromGitHub, buildNpmPackage
|
||||
, nixosTests, debianutils, mkdocs, python3, python3Packages
|
||||
, pkg-config, pixman, cairo, pango }:
|
||||
|
||||
|
||||
let
|
||||
nodeDependencies = (import ./node-composition.nix {
|
||||
inherit pkgs nodejs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
}).nodeDependencies.override {
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ pixman cairo pango ];
|
||||
};
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "ntfy-sh";
|
||||
version = "2.5.0";
|
||||
version = "2.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "binwiederhier";
|
||||
repo = "ntfy";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-C7Ko7JBiQoafos7TbVTqq6pn7NnuLOZo7Dcf6ob2IzI=";
|
||||
hash = "sha256-VX5QXJqHvYE8n/TcSBIg8vuLx2OCe6rM87G1PXBiKRI=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-9mhMeGcAdFjzLJdsGnoTArtxVEaUznpN64j5SMBYHv8=";
|
||||
vendorHash = "sha256-KcA35MVtF/bHtdiMqofs9gSnjl6oYedgqpKZtnFce20=";
|
||||
|
||||
ui = buildNpmPackage {
|
||||
inherit src version;
|
||||
pname = "ntfy-sh-ui";
|
||||
npmDepsHash = "sha256-JvoTssXiBnl/H4odFqRoGtQz2pGwQL4BGxX8Vp/PBwY=";
|
||||
|
||||
prePatch = ''
|
||||
cd web/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mv build/index.html build/app.html
|
||||
rm build/config.js
|
||||
mkdir -p $out
|
||||
mv build/ $out/site
|
||||
'';
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -32,7 +40,6 @@ buildGoModule rec {
|
|||
nativeBuildInputs = [
|
||||
debianutils
|
||||
mkdocs
|
||||
nodejs
|
||||
python3
|
||||
python3Packages.mkdocs-material
|
||||
python3Packages.mkdocs-minify
|
||||
|
@ -44,8 +51,8 @@ buildGoModule rec {
|
|||
'';
|
||||
|
||||
preBuild = ''
|
||||
ln -s ${nodeDependencies}/lib/node_modules web/node_modules
|
||||
DISABLE_ESLINT_PLUGIN=true npm_config_offline=true make web-build docs-build
|
||||
cp -r ${ui}/site/ server/
|
||||
make docs-build
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
ROOT="$(realpath "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")"/../../../..)"
|
||||
|
||||
$(nix-build $ROOT -A nodePackages.node2nix --no-out-link)/bin/node2nix \
|
||||
--nodejs-18 \
|
||||
--node-env ../../../development/node-packages/node-env.nix \
|
||||
--output node-packages.nix \
|
||||
--composition node-composition.nix
|
||||
# removed temporarily because of https://github.com/svanderburg/node2nix/issues/312
|
||||
# --lock ./package-lock-temp.json \
|
|
@ -1,17 +0,0 @@
|
|||
# This file has been generated by node2nix 1.11.1. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_18"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ../../../development/node-packages/node-env.nix {
|
||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
|
||||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
in
|
||||
import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
|
||||
inherit nodeEnv;
|
||||
}
|
15694
pkgs/tools/misc/ntfy-sh/node-packages.nix
generated
15694
pkgs/tools/misc/ntfy-sh/node-packages.nix
generated
File diff suppressed because it is too large
Load diff
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"name": "ntfy",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.8.2",
|
||||
"@emotion/styled": "^11.8.1",
|
||||
"@mui/icons-material": "^5.4.2",
|
||||
"@mui/material": "latest",
|
||||
"dexie": "^3.2.1",
|
||||
"dexie-react-hooks": "^1.1.1",
|
||||
"humanize-duration": "^3.27.3",
|
||||
"i18next": "^21.6.14",
|
||||
"i18next-browser-languagedetector": "^6.1.4",
|
||||
"i18next-http-backend": "^1.4.0",
|
||||
"js-base64": "^3.7.2",
|
||||
"react": "latest",
|
||||
"react-dom": "latest",
|
||||
"react-i18next": "^11.16.2",
|
||||
"react-infinite-scroll-component": "^6.1.0",
|
||||
"react-router-dom": "^6.2.2",
|
||||
"react-scripts": "^5.0.0",
|
||||
"stacktrace-gps": "^3.0.4",
|
||||
"stacktrace-js": "^2.0.2"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,24 +1,22 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p nodePackages.node2nix curl jq nix
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p gnugrep gnused coreutils curl wget jq nix-update prefetch-npm-deps nodejs
|
||||
|
||||
set -euo pipefail
|
||||
# cd to the folder containing this script
|
||||
cd "$(dirname "$0")"
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
CURRENT_VERSION=$(nix-instantiate ../../../../. --eval --strict -A ntfy-sh.version | tr -d '"')
|
||||
TARGET_VERSION="$(curl -sL https://api.github.com/repos/binwiederhier/ntfy/releases/latest | jq --exit-status -r ".tag_name")"
|
||||
version=$(curl -s "https://api.github.com/repos/binwiederhier/ntfy/tags" | jq -r .[0].name | grep -oP "^v\K.*")
|
||||
url="https://raw.githubusercontent.com/binwiederhier/ntfy/v$version/"
|
||||
|
||||
if [[ "v$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then
|
||||
echo "ntfy-sh is up-to-date: ${CURRENT_VERSION}"
|
||||
if [[ "$UPDATE_NIX_OLD_VERSION" == "$version" ]]; then
|
||||
echo "Already up to date!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "ntfy-sh: $CURRENT_VERSION -> $TARGET_VERSION"
|
||||
rm -f package-lock.json
|
||||
wget "$url/web/package-lock.json"
|
||||
npm_hash=$(prefetch-npm-deps package-lock.json)
|
||||
sed -i 's#npmDepsHash = "[^"]*"#npmDepsHash = "'"$npm_hash"'"#' default.nix
|
||||
rm -f package-lock.json
|
||||
|
||||
rm -f package.json package-lock.json
|
||||
curl -sLO https://github.com/binwiederhier/ntfy/raw/$TARGET_VERSION/web/package.json
|
||||
curl -sL -o package-lock-temp.json https://github.com/binwiederhier/ntfy/raw/$TARGET_VERSION/web/package-lock.json
|
||||
|
||||
./generate-dependencies.sh
|
||||
|
||||
rm ./package-lock-temp.json
|
||||
popd
|
||||
nix-update ntfy-sh --version $version
|
||||
|
|
Loading…
Reference in a new issue