diff --git a/pkgs/development/web/cypress/default.nix b/pkgs/development/web/cypress/default.nix index e05a320f63b..a4046c37abe 100644 --- a/pkgs/development/web/cypress/default.nix +++ b/pkgs/development/web/cypress/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1m52v6hhblrjji9c5885bn5qq0xlaw36krbmqfac7fhgsxmkxd2h"; }; + passthru.updateScript = ./update.sh; + # don't remove runtime deps dontPatchELF = true; diff --git a/pkgs/development/web/cypress/update.sh b/pkgs/development/web/cypress/update.sh new file mode 100755 index 00000000000..f8389b517c3 --- /dev/null +++ b/pkgs/development/web/cypress/update.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p common-updater-scripts curl jq + +set -euo pipefail + +basedir="$(git rev-parse --show-toplevel)" +version="$(curl -sL https://cdn.cypress.io/desktop/ | jq '.version' --raw-output)" + +cd "$basedir" +update-source-version cypress "$version"