cockpit: add update script

Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
lucasew 2023-03-14 13:40:20 -03:00
parent 435e4d9793
commit 92628a12d8
2 changed files with 13 additions and 2 deletions

View file

@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "cockpit-project";
repo = "cockpit";
rev = "80a7c7cfed9157915067666fe95b298896f2aea8";
rev = version;
sha256 = "sha256-iAIW6nVUk1FJD2dQvDMREPVqrq0JkExJ7lVio//ALts=";
fetchSubmodules = true;
};
@ -215,7 +215,10 @@ stdenv.mkDerivation rec {
npm run stylelint
'';
passthru.tests = { inherit (nixosTests) cockpit; };
passthru = {
tests = { inherit (nixosTests) cockpit; };
updateScript = ./update.sh;
};
meta = with lib; {
description = "Web-based graphical interface for servers";

View file

@ -0,0 +1,8 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -eu -o pipefail
version="$(curl --silent "https://api.github.com/repos/cockpit-project/cockpit/releases" | jq '.[0].tag_name' --raw-output)"
update-source-version cockpit "$version"