···
6
+
, _experimental-update-script-combinators
13
-
updater = gitUpdater {
14
-
inherit pname version;
15
-
attrPath = lib.toLower pname;
10
+
updateSource = gitUpdater {
18
-
updateScript = builtins.elemAt updater.command 0;
19
-
updateArgs = map (lib.escapeShellArg) (builtins.tail updater.command);
20
-
in writers.writeBash "update-epgstation" ''
13
+
updateLocks = writers.writeBash "update-epgstation" ''
24
-
${updateScript} ${lib.concatStringsSep " " updateArgs}
26
-
cd "${toString ./.}"
18
+
# Get the path to the latest source. Note that we can't just pass the value
19
+
# of epgstation.src directly because it'd be evaluated before we can run
21
+
SRC="$(nix-build ../../../.. --no-out-link -A epgstation.src)"
22
+
if [[ "$UPDATE_NIX_OLD_VERSION" == "$(${jq}/bin/jq -r .version "$SRC/package.json")" ]]; then
23
+
echo "[INFO] Already using the latest version of $UPDATE_NIX_PNAME" >&2
28
-
# Get the path to the latest source. Note that we can't just pass the value
29
-
# of epgstation.src directly because it'd be evaluated before we can run
31
-
SRC="$(nix-build ../../../.. --no-out-link -A epgstation.src)"
32
-
if [[ "${version}" == "$(${jq}/bin/jq -r .version "$SRC/package.json")" ]]; then
33
-
echo "[INFO] Already using the latest version of ${pname}" >&2
27
+
# Regenerate package.json from the latest source.
29
+
dependencies: (.dependencies + .devDependencies),
30
+
} | del(.devDependencies, .main, .scripts)' \
31
+
"$SRC/package.json" \
34
+
dependencies: (.dependencies + .devDependencies),
35
+
} | del(.devDependencies, .main, .scripts)' \
36
+
"$SRC/client/package.json" \
37
+
> client/package.json
37
-
# Regenerate package.json from the latest source.
39
-
dependencies: (.dependencies + .devDependencies),
40
-
} | del(.devDependencies, .main, .scripts)' \
41
-
"$SRC/package.json" \
44
-
dependencies: (.dependencies + .devDependencies),
45
-
} | del(.devDependencies, .main, .scripts)' \
46
-
"$SRC/client/package.json" \
47
-
> client/package.json
49
-
# Fix issue with old sqlite3 version pinned that depends on very old node-gyp 3.x
50
-
${gnused}/bin/sed -i -e 's/"sqlite3":\s*"5.0.[0-9]\+"/"sqlite3": "5.0.11"/' package.json
39
+
# Fix issue with old sqlite3 version pinned that depends on very old node-gyp 3.x
40
+
${gnused}/bin/sed -i -e 's/"sqlite3":\s*"5.0.[0-9]\+"/"sqlite3": "5.0.11"/' package.json
52
-
# Regenerate node packages to update the pre-overriden epgstation derivation.
53
-
# This must come *after* package.json has been regenerated.
54
-
pushd ../../../development/node-packages
42
+
# Regenerate node packages to update the pre-overriden epgstation derivation.
43
+
# This must come *after* package.json has been regenerated.
44
+
pushd ../../../development/node-packages
58
-
# Generate default streaming settings for the nixos module.
59
-
pushd ../../../../nixos/modules/services/video/epgstation
60
-
${yq}/bin/yq -j '{ urlscheme , stream }' \
61
-
"$SRC/config/config.yml.template" \
48
+
# Generate default streaming settings for the nixos module.
49
+
pushd ../../../../nixos/modules/services/video/epgstation
50
+
${yq}/bin/yq -j '{ urlscheme , stream }' \
51
+
"$SRC/config/config.yml.template" \
64
-
# Fix generated output for EditorConfig compliance
65
-
printf '\n' >> streaming.json # rule: insert_final_newline
54
+
# Fix generated output for EditorConfig compliance
55
+
printf '\n' >> streaming.json # rule: insert_final_newline
59
+
_experimental-update-script-combinators.sequence [