diff options
author | Nikolay Korotkiy <sikmir@gmail.com> | 2021-12-12 17:20:57 +0300 |
---|---|---|
committer | Nikolay Korotkiy <sikmir@gmail.com> | 2021-12-12 17:20:57 +0300 |
commit | 065e16b78612935d3bd8fbbfbd67a0caee61b809 (patch) | |
tree | eb01765ae29aa71b9f08097d50ea0976201aa43c /pkgs/applications/editors/cudatext | |
parent | 0195b9b13f110ec5389c6c483b906219a417df21 (diff) | |
download | nixpkgs-065e16b78612935d3bd8fbbfbd67a0caee61b809.tar nixpkgs-065e16b78612935d3bd8fbbfbd67a0caee61b809.tar.gz nixpkgs-065e16b78612935d3bd8fbbfbd67a0caee61b809.tar.bz2 nixpkgs-065e16b78612935d3bd8fbbfbd67a0caee61b809.tar.lz nixpkgs-065e16b78612935d3bd8fbbfbd67a0caee61b809.tar.xz nixpkgs-065e16b78612935d3bd8fbbfbd67a0caee61b809.tar.zst nixpkgs-065e16b78612935d3bd8fbbfbd67a0caee61b809.zip |
cudatext: 1.150.0 → 1.152.0
Diffstat (limited to 'pkgs/applications/editors/cudatext')
-rw-r--r-- | pkgs/applications/editors/cudatext/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/editors/cudatext/deps.json | 12 | ||||
-rwxr-xr-x | pkgs/applications/editors/cudatext/update.sh | 23 |
3 files changed, 33 insertions, 8 deletions
diff --git a/pkgs/applications/editors/cudatext/default.nix b/pkgs/applications/editors/cudatext/default.nix index f30138c2fe0..cf2f36372a0 100644 --- a/pkgs/applications/editors/cudatext/default.nix +++ b/pkgs/applications/editors/cudatext/default.nix @@ -38,13 +38,13 @@ let in stdenv.mkDerivation rec { pname = "cudatext"; - version = "1.150.0"; + version = "1.152.0"; src = fetchFromGitHub { owner = "Alexey-T"; repo = "CudaText"; rev = version; - sha256 = "sha256-6XG4v2S7InKA6OVrV+q1lT/CzNxmzVQfmAAo2cqbqBY="; + sha256 = "sha256-LwPlWfna+/LsQxOBuTFpE7e7Qr5g9NN14rVasMZVImQ="; }; postPatch = '' @@ -99,6 +99,8 @@ stdenv.mkDerivation rec { fi '') additionalLexers; + passthru.updateScript = ./update.sh; + meta = with lib; { description = "Cross-platform code editor"; longDescription = '' diff --git a/pkgs/applications/editors/cudatext/deps.json b/pkgs/applications/editors/cudatext/deps.json index 8e677458a47..6b52a065359 100644 --- a/pkgs/applications/editors/cudatext/deps.json +++ b/pkgs/applications/editors/cudatext/deps.json @@ -16,8 +16,8 @@ }, "ATSynEdit": { "owner": "Alexey-T", - "rev": "2021.11.25", - "sha256": "sha256-CbH0C+UOJ9X2wKG5IEbgitda06lazujYM8l961k7C7g=" + "rev": "2021.12.12", + "sha256": "sha256-glP2Srw3Lw1JNQO+DIwixf4Xdbo5M6pBdYufwGERPW4=" }, "ATSynEdit_Cmp": { "owner": "Alexey-T", @@ -26,13 +26,13 @@ }, "EControl": { "owner": "Alexey-T", - "rev": "2021.10.21", - "sha256": "sha256-RyRpHihmmr/EeVWk9CR0S3pvKy0FzqLZNGti33+4fkI=" + "rev": "2021.12.07", + "sha256": "sha256-givCklAHao26psWLI2qK246igxcAQEeIYTGH61FX6Xo=" }, "ATSynEdit_Ex": { "owner": "Alexey-T", - "rev": "2021.11.25", - "sha256": "sha256-6hk9wNdoz1d3VpuW7yHyIQnnYseEAfgjCNGl6+o0Hjs=" + "rev": "2021.12.07", + "sha256": "sha256-/2Fv/vrpbHSiJro11cjbziUaT4gfwa6y5aQBoYgq3OQ=" }, "Python-for-Lazarus": { "owner": "Alexey-T", diff --git a/pkgs/applications/editors/cudatext/update.sh b/pkgs/applications/editors/cudatext/update.sh new file mode 100755 index 00000000000..8389b3e8a7d --- /dev/null +++ b/pkgs/applications/editors/cudatext/update.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl gnused jq nix-prefetch moreutils + +set -euo pipefail +cd "$(dirname "$0")" + +version=$(curl -s https://api.github.com/repos/Alexey-T/CudaText/releases/latest | jq -r '.tag_name') +url="https://github.com/Alexey-T/CudaText/archive/refs/tags/${version}.tar.gz" +hash=$(nix-prefetch-url --quiet --unpack --type sha256 $url) +sriHash=$(nix hash to-sri --type sha256 $hash) + +sed -i "s#version = \".*\"#version = \"$version\"#" default.nix +sed -i "s#sha256 = \".*\"#sha256 = \"$sriHash\"#" default.nix + +while IFS=$'\t' read repo owner rev; do + latest=$(curl -s https://api.github.com/repos/${owner}/${repo}/releases/latest | jq -r '.tag_name') + if [ "$latest" != "$rev" ]; then + url="https://github.com/${owner}/${repo}/archive/refs/tags/${latest}.tar.gz" + hash=$(nix-prefetch-url --quiet --unpack --type sha256 $url) + sriHash=$(nix hash to-sri --type sha256 $hash) + jq ".${repo}.rev = \"${latest}\" | .${repo}.sha256 = \"${sriHash}\"" deps.json | sponge deps.json + fi +done <<< $(jq -r 'to_entries[]|[.key,.value.owner,.value.rev]|@tsv' deps.json) |