Release notes: https://docs.ntfy.sh/releases/#ntfy-server-v250 Diff: https://github.com/binwiederhier/ntfy/compare/v2.4.0...v2.5.0
63 lines
1.5 KiB
Nix
63 lines
1.5 KiB
Nix
{ lib, pkgs, stdenv, buildGoModule, fetchFromGitHub, nixosTests
|
|
, nodejs, 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";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "binwiederhier";
|
|
repo = "ntfy";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-C7Ko7JBiQoafos7TbVTqq6pn7NnuLOZo7Dcf6ob2IzI=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-9mhMeGcAdFjzLJdsGnoTArtxVEaUznpN64j5SMBYHv8=";
|
|
|
|
doCheck = false;
|
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
|
|
|
nativeBuildInputs = [
|
|
debianutils
|
|
mkdocs
|
|
nodejs
|
|
python3
|
|
python3Packages.mkdocs-material
|
|
python3Packages.mkdocs-minify
|
|
python3Packages.mkdocs-simple-hooks
|
|
];
|
|
|
|
postPatch = ''
|
|
sed -i 's# /bin/echo# echo#' Makefile
|
|
'';
|
|
|
|
preBuild = ''
|
|
ln -s ${nodeDependencies}/lib/node_modules web/node_modules
|
|
DISABLE_ESLINT_PLUGIN=true npm_config_offline=true make web-build docs-build
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = ./update.sh;
|
|
tests.ntfy-sh = nixosTests.ntfy-sh;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Send push notifications to your phone or desktop via PUT/POST";
|
|
homepage = "https://ntfy.sh";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ arjan-s fpletz ];
|
|
};
|
|
}
|