gotify-server: init at 2.0.10
This commit is contained in:
parent
8a74c091b2
commit
a66e5106fd
55
pkgs/servers/gotify/default.nix
Normal file
55
pkgs/servers/gotify/default.nix
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{ stdenv
|
||||||
|
, buildGoPackage
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, buildGoModule
|
||||||
|
, packr
|
||||||
|
, sqlite
|
||||||
|
, callPackage
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "gotify-server";
|
||||||
|
version = "2.0.10";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "gotify";
|
||||||
|
repo = "server";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0f7y6gkxikdfjhdxplkv494ss2b0fqmibd2kl9nifabggfz5gjal";
|
||||||
|
};
|
||||||
|
|
||||||
|
modSha256 = "19mghbs1jasb7vxdw13mmwsbk5sfg3y2vvddr73c82lq0f8g2iha";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace app.go \
|
||||||
|
--replace 'Version = "unknown"' 'Version = "${version}"'
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildInputs = [ sqlite ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ packr ];
|
||||||
|
|
||||||
|
ui = callPackage ./ui.nix { };
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
cp -r ${ui}/libexec/gotify-ui/deps/gotify-ui/build ui/build && packr
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Otherwise, all other subpackages are built as well and from some reason,
|
||||||
|
# produce binaries which panic when executed and are not interesting at all
|
||||||
|
subPackages = [ "." ];
|
||||||
|
|
||||||
|
buildFlagsArray = [
|
||||||
|
"-ldflags='-X main.Version=${version} -X main.Mode=prod'"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A simple server for sending and receiving messages in real-time per WebSocket";
|
||||||
|
homepage = "https://gotify.net";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ doronbehar ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
80
pkgs/servers/gotify/package.json
Normal file
80
pkgs/servers/gotify/package.json
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"name": "gotify-ui",
|
||||||
|
"version": "0.2.0",
|
||||||
|
"private": true,
|
||||||
|
"homepage": ".",
|
||||||
|
"dependencies": {
|
||||||
|
"@material-ui/core": "^4.4.3",
|
||||||
|
"@material-ui/icons": "^4.4.3",
|
||||||
|
"axios": "^0.19.0",
|
||||||
|
"codemirror": "^5.43.0",
|
||||||
|
"detect-browser": "^3.0.0",
|
||||||
|
"js-base64": "^2.5.1",
|
||||||
|
"mobx": "^5.1.1",
|
||||||
|
"mobx-react": "^5.2.8",
|
||||||
|
"mobx-utils": "^5.0.2",
|
||||||
|
"notifyjs": "^3.0.0",
|
||||||
|
"prop-types": "^15.6.2",
|
||||||
|
"react": "^16.4.2",
|
||||||
|
"react-codemirror2": "^5.1.0",
|
||||||
|
"react-dom": "^16.4.2",
|
||||||
|
"react-infinite": "^0.13.0",
|
||||||
|
"react-markdown": "^4.0.6",
|
||||||
|
"react-router": "^4.3.1",
|
||||||
|
"react-router-dom": "^4.3.1",
|
||||||
|
"react-timeago": "^4.1.9",
|
||||||
|
"remove-markdown": "^0.3.0",
|
||||||
|
"typeface-roboto": "0.0.54"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "react-scripts start",
|
||||||
|
"build": "react-scripts build",
|
||||||
|
"test": "react-scripts test --env=node",
|
||||||
|
"eject": "react-scripts eject",
|
||||||
|
"lint": "tslint --project .",
|
||||||
|
"lintfix": "tslint --fix --project .",
|
||||||
|
"format": "prettier \"src/**/*.{ts,tsx}\" --write",
|
||||||
|
"testformat": "prettier \"src/**/*.{ts,tsx}\" --list-different"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/codemirror": "0.0.71",
|
||||||
|
"@types/detect-browser": "^2.0.1",
|
||||||
|
"@types/get-port": "^4.0.0",
|
||||||
|
"@types/jest": "^23.3.1",
|
||||||
|
"@types/js-base64": "^2.3.1",
|
||||||
|
"@types/node": "^10.9.0",
|
||||||
|
"@types/notifyjs": "^3.0.0",
|
||||||
|
"@types/puppeteer": "^1.6.3",
|
||||||
|
"@types/react": "^16.4.11",
|
||||||
|
"@types/react-dom": "^16.0.7",
|
||||||
|
"@types/react-infinite": "0.0.33",
|
||||||
|
"@types/react-router-dom": "^4.3.0",
|
||||||
|
"@types/remove-markdown": "^0.1.1",
|
||||||
|
"@types/rimraf": "^2.0.2",
|
||||||
|
"get-port": "^4.0.0",
|
||||||
|
"prettier": "^1.14.2",
|
||||||
|
"puppeteer": "^1.8.0",
|
||||||
|
"react-scripts": "3.1.1",
|
||||||
|
"rimraf": "^2.6.2",
|
||||||
|
"tree-kill": "^1.2.0",
|
||||||
|
"tslint": "^5.20.0",
|
||||||
|
"tslint-sonarts": "^1.7.0",
|
||||||
|
"typescript": "3.6.2",
|
||||||
|
"wait-on": "^3.0.1"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"extends": "react-app"
|
||||||
|
},
|
||||||
|
"browserslist": {
|
||||||
|
"production": [
|
||||||
|
">0.2%",
|
||||||
|
"not dead",
|
||||||
|
"not op_mini all"
|
||||||
|
],
|
||||||
|
"development": [
|
||||||
|
"last 1 chrome version",
|
||||||
|
"last 1 firefox version",
|
||||||
|
"last 1 safari version"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
25
pkgs/servers/gotify/ui.nix
Normal file
25
pkgs/servers/gotify/ui.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{ yarn2nix-moretea
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
|
||||||
|
yarn2nix-moretea.mkYarnPackage rec {
|
||||||
|
name = "gotify-ui";
|
||||||
|
|
||||||
|
packageJSON = ./package.json;
|
||||||
|
yarnNix = ./yarndeps.nix;
|
||||||
|
|
||||||
|
version = "2.0.8";
|
||||||
|
|
||||||
|
src_all = fetchFromGitHub {
|
||||||
|
owner = "gotify";
|
||||||
|
repo = "server";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "17bxs3wcazrxippf3i9w7d2mq8lf0v5m4bn3nl2zb8v8dl3lsc9a";
|
||||||
|
};
|
||||||
|
src = "${src_all}/ui";
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
yarn build
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
20
pkgs/servers/gotify/update-yarn-deps.sh
Executable file
20
pkgs/servers/gotify/update-yarn-deps.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -I nixpkgs=../../../ -i bash -p wget yarn2nix-moretea.yarn2nix
|
||||||
|
|
||||||
|
# This script is based upon:
|
||||||
|
# pkgs/applications/networking/instant-messengers/riot/update-riot-desktop.sh
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ] || [[ "$1" == -* ]]; then
|
||||||
|
echo "Regenerates the Yarn dependency lock files for the gotify-server package."
|
||||||
|
echo "Usage: $0 <git release tag>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
GOTIFY_WEB_SRC="https://raw.githubusercontent.com/gotify/server/$1"
|
||||||
|
|
||||||
|
wget "$GOTIFY_WEB_SRC/ui/package.json" -O package.json
|
||||||
|
wget "$GOTIFY_WEB_SRC/ui/yarn.lock" -O yarn.lock
|
||||||
|
yarn2nix --lockfile=yarn.lock > yarndeps.nix
|
||||||
|
rm yarn.lock
|
11845
pkgs/servers/gotify/yarndeps.nix
Normal file
11845
pkgs/servers/gotify/yarndeps.nix
Normal file
File diff suppressed because it is too large
Load Diff
@ -9735,6 +9735,8 @@ in
|
|||||||
|
|
||||||
gocd-server = callPackage ../development/tools/continuous-integration/gocd-server { };
|
gocd-server = callPackage ../development/tools/continuous-integration/gocd-server { };
|
||||||
|
|
||||||
|
gotify-server = callPackage ../servers/gotify { };
|
||||||
|
|
||||||
gotty = callPackage ../servers/gotty { };
|
gotty = callPackage ../servers/gotty { };
|
||||||
|
|
||||||
gputils = callPackage ../development/tools/misc/gputils { };
|
gputils = callPackage ../development/tools/misc/gputils { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user