gotify-server: 2.0.4 -> 2.0.5

Improved update script / procedure by getting all versions and shas
needed to build it.
wip/yesman
Doron Behar 4 years ago
parent eeb4e522b5
commit fbb9bcaef4
  1. 10
      pkgs/servers/gotify/default.nix
  2. 1
      pkgs/servers/gotify/mod-sha.nix
  3. 5
      pkgs/servers/gotify/package.json
  4. 1
      pkgs/servers/gotify/source-sha.nix
  5. 4
      pkgs/servers/gotify/ui.nix
  6. 20
      pkgs/servers/gotify/update-yarn-deps.sh
  7. 40
      pkgs/servers/gotify/update.sh
  8. 1
      pkgs/servers/gotify/version.nix
  9. 200
      pkgs/servers/gotify/yarndeps.nix

@ -10,18 +10,18 @@
buildGoModule rec {
pname = "gotify-server";
# Note that when this is updated, along with the hash, the `ui.nix` file
# should include the same changes to the version and the sha256.
version = "2.0.14";
# should be update just like all other files imported like that via the
# `update.sh` script.
version = import ./version.nix;
src = fetchFromGitHub {
owner = "gotify";
repo = "server";
rev = "v${version}";
sha256 = "0hyy9fki2626cgd78l7fkk67lik6g1pkcpf6xr3gl07dxwcclyr8";
sha256 = import ./source-sha.nix;
};
modSha256 = "1awhbc8qs2bwv6y2vwd92r4ys0l1bzymrb36iamr040x961682wv";
modSha256 = import ./mod-sha.nix;
postPatch = ''
substituteInPlace app.go \

@ -0,0 +1 @@
"119f249rvlvxjhwc6wh10yyk3z41488mydmvxs44b5a4p67yvjfw"

@ -3,9 +3,10 @@
"version": "0.2.0",
"private": true,
"homepage": ".",
"proxy": "http://localhost:80",
"dependencies": {
"@material-ui/core": "^4.4.3",
"@material-ui/icons": "^4.4.3",
"@material-ui/core": "^4.9.5",
"@material-ui/icons": "^4.9.1",
"axios": "^0.19.0",
"codemirror": "^5.43.0",
"detect-browser": "^3.0.0",

@ -0,0 +1 @@
"0igzgpzrxkz31njhybsap505mlr32k4qma32v5rafqdi2naz5iyl"

@ -8,13 +8,13 @@ yarn2nix-moretea.mkYarnPackage rec {
packageJSON = ./package.json;
yarnNix = ./yarndeps.nix;
version = "2.0.14";
version = import ./version.nix;
src_all = fetchFromGitHub {
owner = "gotify";
repo = "server";
rev = "v${version}";
sha256 = "0hyy9fki2626cgd78l7fkk67lik6g1pkcpf6xr3gl07dxwcclyr8";
sha256 = import ./source-sha.nix;
};
src = "${src_all}/ui";

@ -1,20 +0,0 @@
#!/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

@ -0,0 +1,40 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p wget yarn2nix-moretea.yarn2nix nix-prefetch-git jq
set -euo pipefail
dirname="$(dirname "$0")"
latest_release=$(curl --silent https://api.github.com/repos/gotify/server/releases/latest)
version=$(jq -r '.tag_name' <<<"$latest_release")
echo got version $version
echo \""${version#v}"\" > "$dirname/version.nix"
printf '%s' $(nix-prefetch-git --quiet --rev ${version} https://github.com/gotify/server | jq .sha256) > $dirname/source-sha.nix
tput setaf 1
echo zeroing modSha256 in $dirname/mod-sha.nix
tput sgr0
printf '"%s"' "0000000000000000000000000000000000000000000000000000" > $dirname/mod-sha.nix
GOTIFY_WEB_SRC="https://raw.githubusercontent.com/gotify/server/$version"
curl --silent "$GOTIFY_WEB_SRC/ui/package.json" -o $dirname/package.json
echo downloaded package.json
curl --silent "$GOTIFY_WEB_SRC/ui/yarn.lock" -o $dirname/yarn.lock
echo downloaded yarndeps.nix
echo running yarn2nix
yarn2nix --lockfile=$dirname/yarn.lock > $dirname/yarndeps.nix
rm $dirname/yarn.lock
echo removed yarn.lock
echo running nix-build for ui
nix-build -A gotify-server.ui
echo running nix-build for gotify itself in order to get modSha256
set +e
modSha256="$(nix-build -A gotify-server 2>&1 | grep "got:" | cut -d':' -f3)"
set -e
printf '"%s"' "$modSha256" > $dirname/mod-sha.nix
tput setaf 2
echo got modSha256 of: $modSha256
tput sgr0
echo running nix-build -A gotify-server which should build gotify-server normally
nix-build -A gotify-server

@ -713,6 +713,14 @@
sha1 = "935122c74c73d2240cafd32ddb5fc2a6cd35cf1f";
};
}
{
name = "_babel_runtime___runtime_7.8.7.tgz";
path = fetchurl {
name = "_babel_runtime___runtime_7.8.7.tgz";
url = "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.7.tgz";
sha1 = "8fefce9802db54881ba59f90bb28719b4996324d";
};
}
{
name = "_babel_template___template_7.4.4.tgz";
path = fetchurl {
@ -762,11 +770,11 @@
};
}
{
name = "_emotion_hash___hash_0.7.3.tgz";
name = "_emotion_hash___hash_0.7.4.tgz";
path = fetchurl {
name = "_emotion_hash___hash_0.7.3.tgz";
url = "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.7.3.tgz";
sha1 = "a166882c81c0c6040975dd30df24fae8549bd96f";
name = "_emotion_hash___hash_0.7.4.tgz";
url = "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.7.4.tgz";
sha1 = "f14932887422c9056b15a8d222a9074a7dfa2831";
};
}
{
@ -890,51 +898,51 @@
};
}
{
name = "_material_ui_core___core_4.4.3.tgz";
name = "_material_ui_core___core_4.9.5.tgz";
path = fetchurl {
name = "_material_ui_core___core_4.4.3.tgz";
url = "https://registry.yarnpkg.com/@material-ui/core/-/core-4.4.3.tgz";
sha1 = "65665d2c4e9cb84e018774e1471f6d0417f4535e";
name = "_material_ui_core___core_4.9.5.tgz";
url = "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.5.tgz";
sha1 = "384869f2840b243241f7881a902f5ffc48360830";
};
}
{
name = "_material_ui_icons___icons_4.5.1.tgz";
name = "_material_ui_icons___icons_4.9.1.tgz";
path = fetchurl {
name = "_material_ui_icons___icons_4.5.1.tgz";
url = "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.5.1.tgz";
sha1 = "6963bad139e938702ece85ca43067688018f04f8";
name = "_material_ui_icons___icons_4.9.1.tgz";
url = "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.9.1.tgz";
sha1 = "fdeadf8cb3d89208945b33dbc50c7c616d0bd665";
};
}
{
name = "_material_ui_styles___styles_4.4.3.tgz";
name = "_material_ui_styles___styles_4.9.0.tgz";
path = fetchurl {
name = "_material_ui_styles___styles_4.4.3.tgz";
url = "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.4.3.tgz";
sha1 = "78239177723660093cc9a277db5759c01c693c2a";
name = "_material_ui_styles___styles_4.9.0.tgz";
url = "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.9.0.tgz";
sha1 = "10c31859f6868cfa9d3adf6b6c3e32c9d676bc76";
};
}
{
name = "_material_ui_system___system_4.4.3.tgz";
name = "_material_ui_system___system_4.9.3.tgz";
path = fetchurl {
name = "_material_ui_system___system_4.4.3.tgz";
url = "https://registry.yarnpkg.com/@material-ui/system/-/system-4.4.3.tgz";
sha1 = "68ca8cf83614255fcd5b9d3a72ce8ee58a43a5c7";
name = "_material_ui_system___system_4.9.3.tgz";
url = "https://registry.yarnpkg.com/@material-ui/system/-/system-4.9.3.tgz";
sha1 = "ee48990d7941237fdaf21b7b399981d614bb0875";
};
}
{
name = "_material_ui_types___types_4.1.1.tgz";
name = "_material_ui_types___types_5.0.0.tgz";
path = fetchurl {
name = "_material_ui_types___types_4.1.1.tgz";
url = "https://registry.yarnpkg.com/@material-ui/types/-/types-4.1.1.tgz";
sha1 = "b65e002d926089970a3271213a3ad7a21b17f02b";
name = "_material_ui_types___types_5.0.0.tgz";
url = "https://registry.yarnpkg.com/@material-ui/types/-/types-5.0.0.tgz";
sha1 = "26d6259dc6b39f4c2e1e9aceff7a11e031941741";
};
}
{
name = "_material_ui_utils___utils_4.4.0.tgz";
name = "_material_ui_utils___utils_4.7.1.tgz";
path = fetchurl {
name = "_material_ui_utils___utils_4.4.0.tgz";
url = "https://registry.yarnpkg.com/@material-ui/utils/-/utils-4.4.0.tgz";
sha1 = "9275421e2798a067850d201212d46f12725828ad";
name = "_material_ui_utils___utils_4.7.1.tgz";
url = "https://registry.yarnpkg.com/@material-ui/utils/-/utils-4.7.1.tgz";
sha1 = "dc16c7f0d2cd02fbcdd5cfe601fd6863ae3cc652";
};
}
{
@ -3041,14 +3049,6 @@
sha1 = "e138cc75e040c727b1966fe5e5f8c9aee256fe3b";
};
}
{
name = "convert_css_length___convert_css_length_2.0.1.tgz";
path = fetchurl {
name = "convert_css_length___convert_css_length_2.0.1.tgz";
url = "https://registry.yarnpkg.com/convert-css-length/-/convert-css-length-2.0.1.tgz";
sha1 = "90a76bde5bfd24d72881a5b45d02249b2c1d257c";
};
}
{
name = "convert_source_map___convert_source_map_1.6.0.tgz";
path = fetchurl {
@ -3282,11 +3282,11 @@
};
}
{
name = "css_vendor___css_vendor_2.0.6.tgz";
name = "css_vendor___css_vendor_2.0.7.tgz";
path = fetchurl {
name = "css_vendor___css_vendor_2.0.6.tgz";
url = "https://registry.yarnpkg.com/css-vendor/-/css-vendor-2.0.6.tgz";
sha1 = "a205f73d7562e8728c86ef6ce5ee7c7e5eefd71b";
name = "css_vendor___css_vendor_2.0.7.tgz";
url = "https://registry.yarnpkg.com/css-vendor/-/css-vendor-2.0.7.tgz";
sha1 = "4e6d53d953c187981576d6a542acc9fb57174bda";
};
}
{
@ -3537,14 +3537,6 @@
sha1 = "b369d6fb5dbc13eecf524f91b070feedc357cf34";
};
}
{
name = "deepmerge___deepmerge_4.0.0.tgz";
path = fetchurl {
name = "deepmerge___deepmerge_4.0.0.tgz";
url = "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.0.0.tgz";
sha1 = "3e3110ca29205f120d7cb064960a39c3d2087c09";
};
}
{
name = "default_gateway___default_gateway_4.2.0.tgz";
path = fetchurl {
@ -5153,6 +5145,14 @@
sha1 = "b09178f0122184fb95acf525daaecb4d8f45958b";
};
}
{
name = "hoist_non_react_statics___hoist_non_react_statics_3.3.2.tgz";
path = fetchurl {
name = "hoist_non_react_statics___hoist_non_react_statics_3.3.2.tgz";
url = "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz";
sha1 = "ece0acaf71d62c2969c2ec59feff42a4b1a85b45";
};
}
{
name = "hosted_git_info___hosted_git_info_2.8.4.tgz";
path = fetchurl {
@ -5905,14 +5905,6 @@
sha1 = "2c163b3fafb1b606d9d17928f05c2a1c38e07677";
};
}
{
name = "is_plain_object___is_plain_object_3.0.0.tgz";
path = fetchurl {
name = "is_plain_object___is_plain_object_3.0.0.tgz";
url = "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz";
sha1 = "47bfc5da1b5d50d64110806c199359482e75a928";
};
}
{
name = "is_promise___is_promise_2.1.0.tgz";
path = fetchurl {
@ -6057,14 +6049,6 @@
sha1 = "4e431e92b11a9731636aa1f9c8d1ccbcfdab78df";
};
}
{
name = "isobject___isobject_4.0.0.tgz";
path = fetchurl {
name = "isobject___isobject_4.0.0.tgz";
url = "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz";
sha1 = "3f1c9155e73b192022a80819bacd0343711697b0";
};
}
{
name = "isomorphic_fetch___isomorphic_fetch_2.2.1.tgz";
path = fetchurl {
@ -6546,67 +6530,67 @@
};
}
{
name = "jss_plugin_camel_case___jss_plugin_camel_case_10.0.0_alpha.25.tgz";
name = "jss_plugin_camel_case___jss_plugin_camel_case_10.0.4.tgz";
path = fetchurl {
name = "jss_plugin_camel_case___jss_plugin_camel_case_10.0.0_alpha.25.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.0.0-alpha.25.tgz";
sha1 = "ea4389de47ccf3b4757f76e62cbb2e8b96b7a2c2";
name = "jss_plugin_camel_case___jss_plugin_camel_case_10.0.4.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.0.4.tgz";
sha1 = "3dedecec1e5bba0bf6141c2c05e2ab11ea4b468d";
};
}
{
name = "jss_plugin_default_unit___jss_plugin_default_unit_10.0.0_alpha.25.tgz";
name = "jss_plugin_default_unit___jss_plugin_default_unit_10.0.4.tgz";
path = fetchurl {
name = "jss_plugin_default_unit___jss_plugin_default_unit_10.0.0_alpha.25.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-default-unit/-/jss-plugin-default-unit-10.0.0-alpha.25.tgz";
sha1 = "df5b39bbc0114146101bb3cf8bc7e281e3d0f454";
name = "jss_plugin_default_unit___jss_plugin_default_unit_10.0.4.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-default-unit/-/jss-plugin-default-unit-10.0.4.tgz";
sha1 = "df03885de20f20a1fc1c21bdb7c62e865ee400d9";
};
}
{
name = "jss_plugin_global___jss_plugin_global_10.0.0_alpha.25.tgz";
name = "jss_plugin_global___jss_plugin_global_10.0.4.tgz";
path = fetchurl {
name = "jss_plugin_global___jss_plugin_global_10.0.0_alpha.25.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-global/-/jss-plugin-global-10.0.0-alpha.25.tgz";
sha1 = "2b6a6a14ef6cdb9994dbadf709e480d5c871b5f6";
name = "jss_plugin_global___jss_plugin_global_10.0.4.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-global/-/jss-plugin-global-10.0.4.tgz";
sha1 = "412245b56133cc88bec654a70d82d5922619f4c5";
};
}
{
name = "jss_plugin_nested___jss_plugin_nested_10.0.0_alpha.25.tgz";
name = "jss_plugin_nested___jss_plugin_nested_10.0.4.tgz";
path = fetchurl {
name = "jss_plugin_nested___jss_plugin_nested_10.0.0_alpha.25.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-nested/-/jss-plugin-nested-10.0.0-alpha.25.tgz";
sha1 = "b8e29d336e1850047914511681d56330e3ea24ac";
name = "jss_plugin_nested___jss_plugin_nested_10.0.4.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-nested/-/jss-plugin-nested-10.0.4.tgz";
sha1 = "4d15ad13995fb6e4125618006473a096d2475d75";
};
}
{
name = "jss_plugin_props_sort___jss_plugin_props_sort_10.0.0_alpha.25.tgz";
name = "jss_plugin_props_sort___jss_plugin_props_sort_10.0.4.tgz";
path = fetchurl {
name = "jss_plugin_props_sort___jss_plugin_props_sort_10.0.0_alpha.25.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-props-sort/-/jss-plugin-props-sort-10.0.0-alpha.25.tgz";
sha1 = "dfaa1a6bf9863ae9593b99bf51cd26caea2fe0ec";
name = "jss_plugin_props_sort___jss_plugin_props_sort_10.0.4.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-props-sort/-/jss-plugin-props-sort-10.0.4.tgz";
sha1 = "43c880ff8dfcf858f809f663ece5e65a1d945b5a";
};
}
{
name = "jss_plugin_rule_value_function___jss_plugin_rule_value_function_10.0.0_alpha.25.tgz";
name = "jss_plugin_rule_value_function___jss_plugin_rule_value_function_10.0.4.tgz";
path = fetchurl {
name = "jss_plugin_rule_value_function___jss_plugin_rule_value_function_10.0.0_alpha.25.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.0.0-alpha.25.tgz";
sha1 = "35350da52334a6031808e197526227434c194277";
name = "jss_plugin_rule_value_function___jss_plugin_rule_value_function_10.0.4.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.0.4.tgz";
sha1 = "2f4cf4a86ad3eba875bb48cb9f4a7ed35cb354e7";
};
}
{
name = "jss_plugin_vendor_prefixer___jss_plugin_vendor_prefixer_10.0.0_alpha.25.tgz";
name = "jss_plugin_vendor_prefixer___jss_plugin_vendor_prefixer_10.0.4.tgz";
path = fetchurl {
name = "jss_plugin_vendor_prefixer___jss_plugin_vendor_prefixer_10.0.0_alpha.25.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.0.0-alpha.25.tgz";
sha1 = "bc0c4b6dcb28d4801775cbad70ad9bc7e0c7707b";
name = "jss_plugin_vendor_prefixer___jss_plugin_vendor_prefixer_10.0.4.tgz";
url = "https://registry.yarnpkg.com/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.0.4.tgz";
sha1 = "1626ef612a4541cff17cf96815e1740155214ed2";
};
}
{
name = "jss___jss_10.0.0_alpha.25.tgz";
name = "jss___jss_10.0.4.tgz";
path = fetchurl {
name = "jss___jss_10.0.0_alpha.25.tgz";
url = "https://registry.yarnpkg.com/jss/-/jss-10.0.0-alpha.25.tgz";
sha1 = "20a506d8159e3f6bd91e133d54ffd3df0ffd3010";
name = "jss___jss_10.0.4.tgz";
url = "https://registry.yarnpkg.com/jss/-/jss-10.0.4.tgz";
sha1 = "46ebdde1c40c9a079d64f3334cb88ae28fd90bfd";
};
}
{
@ -7497,14 +7481,6 @@
sha1 = "2d10c06bdfd312ea9777695a4d28439456b75942";
};
}
{
name = "normalize_scroll_left___normalize_scroll_left_0.2.0.tgz";
path = fetchurl {
name = "normalize_scroll_left___normalize_scroll_left_0.2.0.tgz";
url = "https://registry.yarnpkg.com/normalize-scroll-left/-/normalize-scroll-left-0.2.0.tgz";
sha1 = "9445d74275f303cc661e113329aefa492f58114c";
};
}
{
name = "normalize_url___normalize_url_3.3.0.tgz";
path = fetchurl {
@ -9249,6 +9225,14 @@
sha1 = "21ca9561399aad0ff1a7701c01683e8ca981edcb";
};
}
{
name = "react_is___react_is_16.13.0.tgz";
path = fetchurl {
name = "react_is___react_is_16.13.0.tgz";
url = "https://registry.yarnpkg.com/react-is/-/react-is-16.13.0.tgz";
sha1 = "0f37c3613c34fe6b37cd7f763a0d6293ab15c527";
};
}
{
name = "react_is___react_is_16.10.0.tgz";
path = fetchurl {
@ -9449,6 +9433,14 @@
sha1 = "be05ad7f9bf7d22e056f9726cee5017fbf19e2e9";
};
}
{
name = "regenerator_runtime___regenerator_runtime_0.13.5.tgz";
path = fetchurl {
name = "regenerator_runtime___regenerator_runtime_0.13.5.tgz";
url = "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz";
sha1 = "d878a1d094b4306d10b9096484b33ebd55e26697";
};
}
{
name = "regenerator_transform___regenerator_transform_0.14.1.tgz";
path = fetchurl {

Loading…
Cancel
Save