Compare commits
2 commits
3a471433ed
...
b8be3d80a8
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | b8be3d80a8 | ||
Bruno BELANYI | b04c1b09ea |
25
.drone.yml
25
.drone.yml
|
@ -1,24 +1,27 @@
|
||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: check config
|
type: exec
|
||||||
|
name: NixOS config check
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: format check
|
- name: format check
|
||||||
image: nixos/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-shell -p nixpkgs-fmt --run 'nixpkgs-fmt . --check'
|
- nix develop -c nixpkgs-fmt .
|
||||||
|
|
||||||
- name: notify
|
- name: notifiy
|
||||||
image: plugins/matrix
|
commands:
|
||||||
settings:
|
- nix run .#matrix-notifier
|
||||||
homeserver:
|
environment:
|
||||||
|
ADDRESS:
|
||||||
from_secret: matrix_homeserver
|
from_secret: matrix_homeserver
|
||||||
roomid:
|
ROOM:
|
||||||
from_secret: matrix_roomid
|
from_secret: matrix_roomid
|
||||||
username:
|
USER:
|
||||||
from_secret: matrix_username
|
from_secret: matrix_username
|
||||||
password:
|
PASS:
|
||||||
from_secret: matrix_password
|
from_secret: matrix_password
|
||||||
trigger:
|
when:
|
||||||
status:
|
status:
|
||||||
- failure
|
- failure
|
||||||
- success
|
- success
|
||||||
|
...
|
||||||
|
|
|
@ -14,6 +14,8 @@ rec {
|
||||||
|
|
||||||
lohr = pkgs.callPackage ./lohr { };
|
lohr = pkgs.callPackage ./lohr { };
|
||||||
|
|
||||||
|
matrix-notifier = pkgs.callPackage ./matrix-notifier { };
|
||||||
|
|
||||||
nolimips = pkgs.callPackage ./nolimips { };
|
nolimips = pkgs.callPackage ./nolimips { };
|
||||||
|
|
||||||
vimix-cursors = pkgs.callPackage ./vimix-cursors { };
|
vimix-cursors = pkgs.callPackage ./vimix-cursors { };
|
||||||
|
|
45
pkgs/matrix-notifier/default.nix
Normal file
45
pkgs/matrix-notifier/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ curl, jq, fetchFromGitHub, lib, makeWrapper, stdenvNoCC }:
|
||||||
|
stdenvNoCC.mkDerivation rec {
|
||||||
|
pname = "matrix-notifier";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ambroisie";
|
||||||
|
repo = "matrix-notifier";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-MbtxLUVL4bBS66TJTXky/0blR9lFKzLkRccck7Um2Co=";
|
||||||
|
};
|
||||||
|
|
||||||
|
phases = [ "installPhase" "fixupPhase" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp $src/${pname} $out/bin/${pname}
|
||||||
|
chmod a+x $out/bin/${pname}
|
||||||
|
'';
|
||||||
|
|
||||||
|
wrapperPath = lib.makeBinPath [
|
||||||
|
curl
|
||||||
|
jq
|
||||||
|
];
|
||||||
|
|
||||||
|
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://gitea.belanyi.fr/ambroisie/${pname}";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.unix;
|
||||||
|
maintainers = with maintainers; [ ambroisie ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue