uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
39
pkgs/servers/monitoring/matrix-alertmanager/default.nix
Normal file
39
pkgs/servers/monitoring/matrix-alertmanager/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, callPackage, mkYarnPackage, fetchYarnDeps, fetchFromGitHub, nodejs }:
|
||||
|
||||
mkYarnPackage rec {
|
||||
pname = "matrix-alertmanager";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jaywink";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "M3/8viRCRiVJGJSHidP6nG8cr8wOl9hMFY/gzdSRN+4=";
|
||||
};
|
||||
|
||||
packageJSON = ./package.json;
|
||||
yarnLock = ./yarn.lock;
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
inherit yarnLock;
|
||||
sha256 = lib.fileContents ./yarn-hash;
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
cp ${./package.json} ./package.json
|
||||
'';
|
||||
postInstall = ''
|
||||
sed '1 s;^;#!${nodejs}/bin/node\n;' -i $out/libexec/matrix-alertmanager/node_modules/matrix-alertmanager/src/app.js
|
||||
chmod +x $out/libexec/matrix-alertmanager/node_modules/matrix-alertmanager/src/app.js
|
||||
'';
|
||||
|
||||
passthru.updateScript = callPackage ./update.nix {};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Bot to receive Alertmanager webhook events and forward them to chosen rooms";
|
||||
homepage = "https://github.com/jaywink/matrix-alertmanager";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ yuka ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
41
pkgs/servers/monitoring/matrix-alertmanager/package.json
Normal file
41
pkgs/servers/monitoring/matrix-alertmanager/package.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "matrix-alertmanager",
|
||||
"version": "0.5.0",
|
||||
"description": "Prometheus Alertmanager bot for Matrix",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
"dev": "node_modules/.bin/nodemon src/app.js localhost 3000",
|
||||
"test": "node_modules/.bin/mocha tests/",
|
||||
"start": "node src/app.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jaywink/matrix-alertmanager"
|
||||
},
|
||||
"keywords": [
|
||||
"matrix",
|
||||
"alertmanager",
|
||||
"prometheus",
|
||||
"bot"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
},
|
||||
"author": "Jason Robinson",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"chai": "^4.3.4",
|
||||
"eslint": "^7.32.0",
|
||||
"mocha": "^9.1.1",
|
||||
"nodemon": "^2.0.12",
|
||||
"npm-check-updates": "^11.8.5",
|
||||
"sinon": "^11.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "^10.0.0",
|
||||
"express": "^4.17.1",
|
||||
"matrix-js-sdk": "^12.5.0",
|
||||
"striptags": "^3.2.0"
|
||||
},
|
||||
"bin": "src/app.js"
|
||||
}
|
||||
32
pkgs/servers/monitoring/matrix-alertmanager/update.nix
Executable file
32
pkgs/servers/monitoring/matrix-alertmanager/update.nix
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, writeShellScript
|
||||
, coreutils, jq, common-updater-scripts
|
||||
, curl, wget, gnugrep, yarn, prefetch-yarn-deps
|
||||
}:
|
||||
|
||||
writeShellScript "update-matrix-alertmanager" ''
|
||||
set -xe
|
||||
export PATH="${lib.makeBinPath [ gnugrep coreutils curl wget jq common-updater-scripts yarn prefetch-yarn-deps ]}"
|
||||
|
||||
cd pkgs/servers/monitoring/matrix-alertmanager/
|
||||
|
||||
owner="jaywink"
|
||||
repo="matrix-alertmanager"
|
||||
version=`curl -s "https://api.github.com/repos/$owner/$repo/tags" | jq -r .[0].name | grep -oP "^v\K.*"`
|
||||
url="https://raw.githubusercontent.com/$owner/$repo/v$version/"
|
||||
|
||||
(
|
||||
cd ../../../..
|
||||
update-source-version matrix-alertmanager "$version" --file=pkgs/servers/monitoring/matrix-alertmanager/default.nix
|
||||
)
|
||||
|
||||
rm -f package.json package-lock.json yarn.lock
|
||||
wget "$url/package.json" "$url/package-lock.json"
|
||||
|
||||
yarn import
|
||||
echo $(prefetch-yarn-deps) > yarn-hash
|
||||
|
||||
jq '. + { bin: .main }' package.json > package.json.tmp
|
||||
mv package.json{.tmp,}
|
||||
|
||||
rm -rf package-lock.json node_modules
|
||||
''
|
||||
1
pkgs/servers/monitoring/matrix-alertmanager/yarn-hash
Normal file
1
pkgs/servers/monitoring/matrix-alertmanager/yarn-hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
1vjg0rapdj88ygc00j60w4h5wkaf6jycmlx3fz13xar74ikwrifa
|
||||
3560
pkgs/servers/monitoring/matrix-alertmanager/yarn.lock
Normal file
3560
pkgs/servers/monitoring/matrix-alertmanager/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue