2022-09-28 12:55:48 +00:00
|
|
|
{ lib, pkgs, nodejs, stdenv, buildGoModule, fetchFromGitHub, debianutils, mkdocs, python3, python3Packages }:
|
2022-03-30 15:35:26 +00:00
|
|
|
|
2022-09-28 12:55:48 +00:00
|
|
|
let
|
|
|
|
nodeDependencies = (import ./node-composition.nix {
|
|
|
|
inherit pkgs nodejs;
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
|
|
|
}).nodeDependencies;
|
|
|
|
in
|
2022-03-30 15:35:26 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ntfy-sh";
|
2022-11-19 15:43:15 +00:00
|
|
|
version = "1.29.1";
|
2022-03-30 15:35:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "binwiederhier";
|
|
|
|
repo = "ntfy";
|
|
|
|
rev = "v${version}";
|
2022-11-19 15:43:15 +00:00
|
|
|
sha256 = "sha256-ikXhST+fvXu7FBeoYMzPq2LhpAw3gfaES1WlhnRO8BY=";
|
2022-03-30 15:35:26 +00:00
|
|
|
};
|
|
|
|
|
2022-11-19 15:43:15 +00:00
|
|
|
vendorSha256 = "sha256-VVqaQFluqV77/+Asu9xSBpCvoYr276UE3Yg+iNkxP0o=";
|
2022-03-30 15:35:26 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-10-06 18:55:47 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
|
|
|
|
2022-09-28 12:55:48 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
debianutils
|
|
|
|
mkdocs
|
|
|
|
nodejs
|
|
|
|
python3
|
|
|
|
python3Packages.mkdocs-material
|
|
|
|
python3Packages.mkdocs-minify
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's# /bin/echo# echo#' Makefile
|
|
|
|
'';
|
|
|
|
|
2022-03-30 15:35:26 +00:00
|
|
|
preBuild = ''
|
2022-09-28 12:55:48 +00:00
|
|
|
ln -s ${nodeDependencies}/lib/node_modules web/node_modules
|
|
|
|
DISABLE_ESLINT_PLUGIN=true npm_config_offline=true make web-build docs-build
|
2022-03-30 15:35:26 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|