nix-config/pkgs/matrix-notifier/default.nix

46 lines
1 KiB
Nix
Raw Permalink Normal View History

{ lib, curl, jq, fetchFromGitHub, makeWrapper, pandoc, stdenvNoCC }:
2021-06-13 18:37:11 +02:00
stdenvNoCC.mkDerivation rec {
pname = "matrix-notifier";
2024-01-03 16:58:34 +01:00
version = "0.4.0";
2021-06-13 18:37:11 +02:00
src = fetchFromGitHub {
owner = "ambroisie";
repo = "matrix-notifier";
rev = "v${version}";
2024-01-03 16:58:34 +01:00
hash = "sha256-6KHteQx0bHodpNp7cuUIGM7uBRPaj386n2t5yz6umpY=";
2021-06-13 18:37:11 +02:00
};
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
mkdir -p $out/bin
cp $src/${pname} $out/bin/${pname}
chmod a+x $out/bin/${pname}
'';
wrapperPath = lib.makeBinPath [
curl
jq
pandoc
2021-06-13 18:37:11 +02:00
];
fixupPhase = ''
patchShebangs $out/bin/${pname}
wrapProgram $out/bin/${pname} --prefix PATH : "${wrapperPath}"
'';
meta = with lib; {
description = ''
A very simple bash script that can be used to send a message to
a Matrix room
'';
homepage = "https://git.belanyi.fr/ambroisie/${pname}";
2021-06-13 18:37:11 +02:00
license = licenses.mit;
mainProgram = "matrix-notifier";
2021-06-13 18:37:11 +02:00
maintainers = with maintainers; [ ambroisie ];
platforms = platforms.unix;
2021-06-13 18:37:11 +02:00
};
}