2021-06-16 21:17:45 +02:00
|
|
|
{ lib, curl, jq, fetchFromGitHub, makeWrapper, pandoc, stdenvNoCC }:
|
2021-06-13 18:37:11 +02:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "matrix-notifier";
|
2023-04-01 17:33:26 +02:00
|
|
|
version = "0.3.0";
|
2021-06-13 18:37:11 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ambroisie";
|
|
|
|
repo = "matrix-notifier";
|
|
|
|
rev = "v${version}";
|
2023-04-01 17:33:43 +02:00
|
|
|
hash = "sha256-NE9RO0ep2ibrT9EUPGTnUE3ofdNTCHwelxnX9tCflg0=";
|
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
|
2021-06-16 21:17:45 +02:00
|
|
|
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
|
|
|
|
'';
|
2023-03-16 21:37:52 +01:00
|
|
|
homepage = "https://git.belanyi.fr/ambroisie/${pname}";
|
2021-06-13 18:37:11 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ ambroisie ];
|
|
|
|
};
|
|
|
|
}
|